Can someone explain character rotation
I have made a teleporter and when a player runs through it I want the player to rotate so that he's facing away from the teleporter he teleported to, no matter if he went face first, sideways or backwards into the first teleporter. I understand it's something with the player controller holding the rotation information, but I can't seem to get it right.
My graph is like this:
It seems pretty random (which ofc. it's not) what the player rotation is, when he "spawns" at the new location.
Do I have to add or substract some numbers to get rotation right or???
This answer addresses the same question, but I cannot get it to work replicate the result. https://answers.unrealengine.com/questions/105866/rotate-player-in-the-same-rotation-than-target.html
asked Jan 29 '15 at 02:15 PM in Blueprint Scripting
If you want to do this in multiplayer, then you would want to let the teleporter send a request to the server to change the rotation. So if someone walks through the teleporter, you call your "teleport" function i guess.
I would make a custom event called "teleport" which is replicated to server. Give it a reference to the PlayerController or Character who activated the teleporter and let the Server set the rotation.
The server has ALL player controllers. he can work with a player controller that you give to him. The Player itself only has his own (0). So with this PlayerController that you gave the server to work with, you can now set the Actor Rotation of the Character and maybe the controll rotation of the Controller itself to a new rotation. The new rotation should be made like you tried in you last comment picture.
answered Jan 29 '15 at 08:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here