- Home /
Jump over object help
Hell all i was wondering if someone could help me i want to implement jumping over object in my game like free runners do. Now i made a animation in maya just on a cube to test something basically the cube was in 0,0,0 axis in maya and the animation starts on axis 0 then the cube is animated to move forward and that move the axis. Now when i exported the cube into unity and played the animation the cube jump worked but every time the cube would end up in the center. This was just a test keep in mind now i want to know how they made there player jump over a object in there game. Here is the link :
http://www.youtube.com/watch?v=xYgECwRDIgE
watch from 2:12 and on
i would be great full if someone could help me thanks
Answer by ScroodgeM · Aug 18, 2012 at 08:59 PM
best way is to make animation always centered and move object in unity with animation playing. you can't be sure in jump height and length on animate stage.
after you did the animation, you can use simple first person controller prefab from unity and atach animated model to it to see how it works
how do i do that ? how can i make it move forward while the animation is playing and thanks for the reply :)
every object has it's zero-point, also known as pivot. in unity it showed when object selected.
all animations are played around this pivot. so, if your animation is 'jump 2 meters up' around this point, object will jump 2 meters up on animation play, but pivot will stay at initial position.
also, pivot can be moved. it this case animation will apply all pivot moves/rotates. it means if you move pivot 2 meters forward, animation will move object relative to this pivot 2 meters up. and totally your object will move forward and up to 2 meters each.
now, your task is: - move object - animate object
you should move object in unity to interact with scene. to stop before walls. to fall through holes etc.
and now it's clear that animation should not move object. if we for example animate a jump of player where it moves 2 meters forward, we can jump through the wall that was 1 meter in front of us. unity will still think that player stays in front of wall, but animation will be in another place.
so, choose a point of character (usually this is pelvis) and animate character so it's pelvis will always stay at point. then, animated character use in unity. see third person controller example for details.
that's a really smart answer :) i will give that a try for now i am marking this as the correct answer :) thanks so much :)
Your answer
Follow this Question
Related Questions
How to keep going forward while jumping ? 1 Answer
Jumping player at platform connection 2 Answers
my jump key works about once every 10 presses 1 Answer
jump and check ground problem! 2 Answers