Stuck on a project, need help with mechanics
Hello friendly people of Unity, im stuck on a particular project and need some tips..
What im trying to do is set my float speed; to increase as I increase the rotation of a particular object (lever).. I get that I cant convert angles to float values.. so.. im stuck.. anyone got ideas? Would appreciate any help..
The two object are separated, the lever is used to propel it's parent forward witch is not a rigid body.. i'll keep an eye on this tread and respond as soon and often as i can.. thanks
Forgot to mention, this is a VR project using Vive controllers, if it was keyboard input i would have no problem doing this.. im trying to increase speed by rotating a lever
You can convert angles of an axis into float values. For example:
float xAngle = lever.transform.eulerAngles.x;
will give you the angle on the x-axis as a float.
Ah man, i just learned something new, thanks allot! :)
This will be usefull for my future game mechanics.. i figured out how to solv my problem acualy... i just used a Hinge Joint and the colliders along the travel path set my speed.. all i really needed.. sometimes the simple way is the best way i think..
Thanks allot again man, cheers
Your answer
Follow this Question
Related Questions
How can I set my object rotate speed with this code? 0 Answers
Space.Self smooth rotating menu around hand. How can I control the speed of the rotation?!?!? 0 Answers
Camera zoom out relative to player's speed 0 Answers
I need help making a ball accelerate 0 Answers
Object rotation lerp with acceleration 0 Answers