• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Apr 19, 2014 at 02:19 AM by Scrapy_ for the following reason:

Question is off-topic or not relevant

avatar image
0
Question by Scrapy_ · Apr 12, 2014 at 12:02 PM · animationcollisionrigidbodycollidertrigger

Possible to stop collider from "popping" through plane when re-centering?

Hey, newbie here to both unity and scripting.

I have a problem which is driving me crazy.. I have created a ladder in blender and some climbing animations (one for grabbing the ladder, one for climbing, and a final one for jumping up at the top)

I had to adjust the collider on my character when he climbs the ladder so it does not prevent him from reaching the top.

This works, however the collider is below my character after resetting it.. the collider then bounces up into the correct position on the plane, while at the same time pushing the character itself up into the air a good 2-3 feet before the character falls back down and rests on the plane inline with the collider.

I have tried to freeze the Y position however that just makes the collider stay in the ground instead of popping back up, causing the character to fall below ground.

EDIT- cleaned up and added pics Here are some pics so you can get a better understanding of exactly what I mean... http://imgur.com/4JSzjfn,ZFJgYt4,l9vdh8F,bUOoqS2

     void Update()
 {
     if (anim.GetBool (hash.climbLadderExit) == true)
     {
         col.center = new Vector3(0,2,0);
         col.height = 0;
     }
     
     if (anim.GetBool (hash.climbLadderReset) == true)
     {
         col.center = new Vector3(0,1,0);
         col.height = 2;
         anim.SetBool (hash.climbLadderReset, false);
         anim.SetBool (hash.offLadder, true);
     }
 }


Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
0

Answer by Scrapy_ · Apr 13, 2014 at 03:16 PM

Ok I worked this out, and figured I should put the fix here just incase somebody else runs into this kind of issue.

turns out the problem was not related to the collider, but instead was related to the animation, while trying out random things it turns out changing the animations root transform position Y "based upon" field to feet did the trick!, I did not need to bake it into the pose.. only change the field from "original" to "feet".

now my character climbs the ladder and stands up smoothly as he should xD

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Jojo B · Apr 13, 2014 at 12:29 PM

you could try transforming your caracter up by one before changing the collider or alternatively move the collider over several frames allthough this will probably give a gitery sought of efect

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Scrapy_ · Apr 13, 2014 at 01:15 PM 0
Share

I worked it out and posted a reply here awhile ago but I guess the mods are a bit too busy to approve it, and I have no idea how to close this question.

turns out the problem was unrelated to the collider and all I had to do was change a not so obvious setting on one of the animations, (root transform position Y - based upon to feet instead of original).

thank you anyway for your reply Jojo

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do i get OnTriggerStay2D to work? 1 Answer

Objects placed manually collide, but don't if instantiated? 1 Answer

Trigger animtaion when hit 1 Answer

How to get collision point when using onTriggerEnter 4 Answers

Can't add Rigidbody component because collision prevents it 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges