- Home /
Gameobject rotation (multi axis)
i'm trying to make a skateboarding game where the board is a rigidbody interacting phyisically with the skater's feet, i need to identify which tricks the board is doing, like a 360 flip (360 degrees of rotation on the y axis, 360 degrees rotation on the z axis), but i have no idea how to measure the board's axes rotation? any suggestions on how to do that? or any suggestions on how to identify tricks somehow?
Answer by madks13 · Jul 19, 2018 at 02:25 PM
Maybe have a system with currentRotation and originRotation. When you detect a rotation input, save current rotation as originRotation, then update currentRotation (if you don't mind using transform.rotation directly, you can use that instead of currentRotation). Add a little check for number of full rotations and you're done.
Your answer
