SA-MP Forums Archive
Stopping head movment - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Stopping head movment (/showthread.php?tid=112603)



Stopping head movment - Mikep. - 08.12.2009

I know it isn't exactly possible, please don't post saying 'u shud suggest dis m8', i'm not a nub.

Is there a way to make the player face the camera when I use SetPlayerCameraPos/LookAt?

Look:


Looks stupid.


Re: Stopping head movment - Finn - 08.12.2009

Tried setting the player to spectate mode, before setting the camera positions?


Re: Stopping head movment - Mikep. - 08.12.2009

Quote:
Originally Posted by Finn
Tried setting the player to spectate mode, before setting the camera positions?
How can he see himself if he is spectating..?


Re: Stopping head movment - Finn - 08.12.2009

Oh, you can't set the camera position while spectating? Didn't know that.

Or does the player disappear while specating? Didn't know that neither.

Sorry, was just my idea how I would have tried to solve your problem.


Re: Stopping head movment - Joe Staff - 08.12.2009

You could replace your person with an skin-matching NPC. Off the top of my head I can't really recall a way to freeze head spin.


Re: Stopping head movment - NeRoSiS - 08.12.2009

This might sound stupid, but try TogglePlayerControllable?

Good luck.


Re: Stopping head movment - Joe Staff - 08.12.2009

Quote:
Originally Posted by Wazza!
This might sound stupid, but try TogglePlayerControllable?

Good luck.
I assumed he had that already going when you're set to choose skin, wouldn't want to go walking off camera would you?
I just thought of a way
pawn Код:
SetPlayerFacingAngle(playerid,A);
SetCameraBehindPlayer(playerid);
SetCameraPosition(playerid,x,y,z);
SetCameraLookAt(playerid,x,y,z);
Fix that up and it oughta work for you.
By changing the facing angle, you control where 'SetCameraBehindPlayer' is going to look, and SetCameraLookAt doesn't effect the player's head movement, so the last angle the player had looked at was SetCameraBehindPlayer.


Re: Stopping head movment - Mikep. - 09.12.2009

I have tried everything you guys have suggested. I can't use an NPC for all my players...