Camera rotates involuntarily when player's parent changes.

Support for MFPS 2.0 (for verified users)
Forum rules
To request support/assistance for MFPS, you first have to verify your purchase by sending your purchase invoice number to Lovatto in a PM.
Post Reply
User avatar
Savo
New Member
New Member
Posts: 3
Joined: Thu Sep 23, 2021 5:08 pm

I'm running into an issue with the camera and could use some support given this use case:

Use Case
I am creating moving platforms that translates over the x, y, and z axis as well as rotates around the y axis. The player should be able to jump onto the platform and be carried by it both in movement and rotation, then leave the platform at a different level (i.e. rotating elevator).

Steps to Replicate Issue
1. The player has no parent and camera is facing 0 degrees.
2. The player's parent (in the hierarchy) is set to another game object (the platform) who's rotation is set to 90 degrees around the Y axis.
Result:
3. The player's camera rotates immediately by 90 degrees (or by whatever the rotation is at the time of the parenting).

I realize the reason for this is because of the transition between global and local rotations; however, I'm trying to figure out away to make the transition smooth.
Post Reply