Little Help With Players Camera
#1

How can i move players camera to look at some other player.
Reply
#2

https://sampwiki.blast.hk/wiki/TogglePlayerSpectating
https://sampwiki.blast.hk/wiki/PlayerSpectatePlayer
Reply
#3

I'm not looking for spectate function,...
I just want to rotate player to look at some other player, to rotate his camera...

p.s. Pozdrav Srbine
Reply
#4

nvm - too late
Reply
#5

Use the savedpositions with /save
Reply
#6

Not too sure, it is complicated ...

But try getting the playerid and targetid's positions, if the playerid is in range of the targetid, use SetPlayerCameraLookAt(playerid,targetidX,targetidY ,targetid,Z);
Reply
#7

@grand.Theft.Otto i'll try that. Edit: Don't work, as i thought..
Any other solution? I need that for snowball throwing, to move players facing angle to look at person on which he is throwing snowball...
Reply
#8

BUMP! Anyone?
Reply
#9

You need to SetPlayerCameraPos AND SetPlayerCameraLookAt.

Imagine X = the player you want to look at and x is your camera, ---- = line of sight


Код:
x----------------X
x,y,z           x,y,z
You need to specify both those points.
My question is this, what exactly is the purpose of your code?
Like what are you trying to achieve by having the camera aimed at another player.
That will determine what steps are required to produce the result you want
Reply
#10

For snowball throwing, when player throw snowball on other player to look at him...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)