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 trialalexvalladares
21,478 Pointsrotation vs moveRotation()
Hi there! In the video it shows as we use the moveRotation method and the lerp to smoothly rotate the player, in the documentation we see:
"Set Rigidbody.rotation instead, if you want to teleport a rigidbody from one rotation to another, with no intermediate positions being rendered."
I've done this for testing, but I see no difference between two ways. The frog rotates the same way in both methods.
Regards!
1 Answer
Nick Pettit
Treehouse TeacherSetting the Rigidbody.rotation variable directly does not take a Rigidbody's interpolation setting into account, but using Rigidbody.MoveRotation() does.
alexvalladares
21,478 PointsThanks Nick!
alexvalladares
21,478 Pointsalexvalladares
21,478 PointsWell, I slightly see a difference, but very very light. I've tried increasing the turningSpeed value but no effect at all, even with ridiculous values (2000).