[C#] How to rotate a ped (Player.Character)
Player.Character.Rotation = new GTA.Math.Vector3(0,0,180)
Player.Character.Heading = 180;
Player is not rotated
@TheChilliPL I have just tried this and it works.
I had this code trigger on a keypress:
Game.Player.Character.Rotation = new Vector3(0, 0, 180);
... and the player immediately faced that direction... but didn't stay there. He turned back to the original heading after a short time.
I also did Game.Player.Character.Heading = 180; and that also worked, but it also turned back to the previous heading.
Maybe the game keeps track of where the camera is and in which direction you were moving relative to that and tries to maintain that position.
When I added this after it:
World.RenderingCamera.Position = Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, -10, 1));
The player stood in the rotated position. .. although the camera didn't actually move, which was strange.
Actually it works, but no when playing scenario...
@TheChilliPL Scenarios probably force the player into fixed positions, I don't know much about them I'm afraid, sorry I can't help with those.
@LeeC2202 Oh, I'm looking for it for about month and nothing...
I can play scenario with position I want to, but I can't find way to modify the rotation...
@TheChilliPL Where is Script Hook V documentation?
Thanks, I'll check it