SA-MP Forums Archive
Camera scripting questions - 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: Camera scripting questions (/showthread.php?tid=374818)



Camera scripting questions - HeLiOn_PrImE - 04.09.2012

Hey there...is there a possible way to set a camera based on the player position? For example, I made a tuning menu using a dialog. But since the dialog can't be moved from the center of the screen I am thinking of warping the camera in different positions, so the player can see the changing car parts.


Re: Camera scripting questions - C00K13M0N$73R - 04.09.2012

https://sampwiki.blast.hk/wiki/SetPlayerCameraLookAt
https://sampwiki.blast.hk/wiki/SetPlayerCameraPos


Re: Camera scripting questions - HeLiOn_PrImE - 04.09.2012

And the coordinates are based on the player's position? I mean the origin should be the center of the car, right?


Re: Camera scripting questions - C00K13M0N$73R - 04.09.2012

Quote:
Originally Posted by HeLiOn_PrImE
Посмотреть сообщение
And the coordinates are based on the player's position? I mean the origin should be the center of the car, right?
I believe on the camera position, Once you used SetCameraPos. Then the camera looks towards a certain direction.

Never really used them myself.


Re: Camera scripting questions - HeLiOn_PrImE - 08.09.2012

It doesnt work how i need it...basically, those functions, allow you to set a camera to some certain coordinates. The setcameralookat works like this. You put the coordinates, and the camera will look at them, no matter the distance. The coordinates are based on the map origin (the middle of san andreas) x=y=z=0.

What I need to do is, to change the origin. I need it to be the center of the car, not the center of the map. That way, the cameras will always look at the car areas I need, no matter the player's position on the map.

I hope I made myself clear enough, so that somebody can help me...