Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!