As the title describes, I’m curious if anyone knows if it’s possible to create a script to find the YAW, PITCH, and ROLL of a player. Specifically, the angle they are looking at in the world. I know the “GetViewRotation” function but I’m not sure if that’s the way, and I’m not sure how to access it’s yaw, pitch and roll
Yes, that’s correct, here is a bit of code for you to see what you can get:
AllPlayers := GetPlayspace().GetPlayers()
for(Player : AllPlayers, FortCharacter := Player.GetFortCharacter[]):
rot:rotation := FortCharacter.GetViewRotation()
ypr := rot.GetYawPitchRollDegrees()
Print("Player rotation {ToString(rot)}")
1 Like