Thanks for thinking along with me Grendal!
Have you tried parenting the controller object to an empty gameobject that you perform the rotation/position on?
I didn't think of this option but it didn't work. Intentionally it did, it set the rotation of the game object and FPScontr. right. When you start walking again and you teletransport to the same spot again it doesn't reset the rotation because the game object is already set to that rotation...As soon as you reset the rotation of the game object to 0.0.0 again it flips...
Also you say you save position/rotation data after disabling the controller object?
Try storing it before disabling the object.
this is kind of the problem. It's not possible to set/store the rotation of the FPSContr. with the controller script enabled.
I did work on a workaround though. It's still not 100% right, but in general it works:
- I removed all of the mouse look parts from the FirstPersonController.cs in MonoDevelop (script is attached)
- Then I added a simple FSM with only a mouse look action to the FPS Controller
- When I open the teletransport menu I disable this FSM
- Teletransporting works right now and when I close the menu I enable the FSM again
This workaround kind of confirmed that the issue is caused by the 'mouse look section' in the FirstPersonController script. In previous Unity versions this used to be a separate script...I don't know why they merged it with the controller script.
But since I'm a newnewnewbe to scripting I'm still eager to hear other thoughts on this one! There might be a more simple solution...