Attached camera
#1

Camera is not moving with player, why?
Код:
	new Float:x, Float:y, Float:z;
	new cameraobject;
	GetPlayerPos(playerid, x, y, z);
	cameraobject = AttachObjectToPlayer(19300, playerid, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
	
	SetPlayerCameraPos(playerid, x, y, z+10);
	SetPlayerCameraLookAt(playerid, x, y, z, 1);
	AttachCameraToObject(playerid, cameraobject);
Reply
#2

I think than you have to update it every time when it moves. Try to use OnPlayerUpdate callback

EDITED:
Just put that code under OnPlayerUpdate callback.

+Rep if I helped you.
Reply
#3

now is bad too, its must be attached but its not work, idk why man
Reply
#4

You should try "PlayerSpectatePlayer" ?
Reply
#5

no because i cant spectate my character
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)