|
Hey I have this code to making a steering wheel:
It is working ok but I need the steer to comeback to the original position when I stop pressing the arrow keys. How can I do that? I tried using Quaternion.Slerp but I can't define the original position to comeback to. Thanks for any help
(comments are locked)
|
|
Create a quaternion variable to store the default rotation in local space on awake or start, then you can lerp/slerp just fine from transform.localRotation to that variable. Yeah you are right, I was using transform.rotation instead of the localRotation, that was the error. Thanks
May 07 '11 at 03:54 PM
maveryck21
(comments are locked)
|
|
My problem is solved thanks to Alec Slayden, here is the code:
(comments are locked)
|
