Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development How to Make a Video Game Player Input and Cameras Rotate the Player Towards the Target

alexvalladares
alexvalladares
21,478 Points

Physics and animation

One simple question: The physics applied to the hop are implicit in the animation or it depends on the unity phisycs like rigid body? I see there is a model called Hop that already seems to have that physics, but this point it's not clear for me.

2 Answers

Nick Pettit
STAFF
Nick Pettit
Treehouse Teacher

Hi alexvalladares,

Broadly speaking, there's two ways to do locomotion on a character in Unity:

  1. The animation is stationary and the player is moved with physics or by changing the transform, OR...
  2. The animation actually translates through space, and the movement is dependent on the animation

In the case of the frog, we're using method #2. The frog's hop animation is what actually moves the frog forward. The flies are a good example of method #1, where the fly only flaps its wings in the animation; code changes the transform which is what makes the fly actually move through space.

I hope that helps! We'll talk more about this in courses that focus on animation.

alexvalladares
alexvalladares
21,478 Points

Perfect Nick, it would be awesome starting to plan Maya or 3dStudio courses also, this is a great one, but most of the heavy part (3d design) it's already done for us.

Thanks for the answer!