SA-MP Forums Archive
SetPlayerCameraLookAt after/with AttachCameraToObject - 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)
+--- Thread: SetPlayerCameraLookAt after/with AttachCameraToObject (/showthread.php?tid=330706)



SetPlayerCameraLookAt after/with AttachCameraToObject - MP2 - 02.04.2012

I have a CCTV camera object in a corner in an interior, and have used AttachCameraToObject() to attach the camera to get the camera's point of view, but when I do, I get a face full of wall, because the camera faces north no matter what. Using SetPlayerCameraLookAt after attaching the camera does nothing. Can it, please?


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - leong124 - 02.04.2012

I think it is good to also have a function similar to SetPlayerCameraLookAt, but the camera will always look at the point no matter how the camera position changes.


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - park4bmx - 02.04.2012

Instead of attaching it why don't you get the objects position and set the camera,s one to it but just X & Y alitle bit off cord
So is not inside then just use SetPlayerCameraToLookAt


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - MP2 - 02.04.2012

Because I want people to be able to look around - that's why I've used AttachCameraToObject.


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - _[HuN]_Epsilon_ - 03.04.2012

AttachCameraToObject has parameters, use them.


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - MP2 - 03.04.2012

Quote:
Originally Posted by _[HuN]_Epsilon_
Посмотреть сообщение
AttachCameraToObject has parameters, use them.
playerid, objectid




Re: SetPlayerCameraLookAt after/with AttachCameraToObject - park4bmx - 03.04.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
Because I want people to be able to look around - that's why I've used AttachCameraToObject.
Using keys or mouse ?
Asking becouse I have an idea.


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - robintjeh - 03.04.2012

Mouse.


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - _[HuN]_Epsilon_ - 03.04.2012

Quote:
Originally Posted by MP2
Посмотреть сообщение
playerid, objectid
Ok.

Then rotate the object to face north, attach the camera, rotate the object back.
Any effect?


Re: SetPlayerCameraLookAt after/with AttachCameraToObject - MP2 - 03.04.2012

No, it always faces north.

@ park4bmx and robintjeh:
DUH. I want it to face the right way as soon as they type /cctv -_-