Hi folks! My team and I are working on a 3d game in Unity and we’ve encountered a specific problem that has us stomped. The game is first person, and we are attempting to make the player jump on a rotating platform. Once on the platform, it seems the rotation literally teleports the player controller to the same direction of the rotation. As you can imagine, it’s quite troublesome. We’ve scoured the internet and the Unity forum, have found people with the same basic problem but no solution… Any kind soul out there who could give us a bump / help? It would be greatly appreciated! Our player controller becomes a child of the platform and takes on the basic info such as position and scale, but the rotation goes haywire! Thanks in advance !!!
(Hope this helps, I understand searching for answers on the internet can be tricky)
To save the rotation of any GameObject at any time and store it in a variable -
Quaternion rotation = GameObject.transfom.rotation;
Then to set a GameObject to that rotation -
GameObject.transform.rotation = rotation;