[HELP] Moving camera position
#1

Hello guys, i need a little bit help here.

i am working on an apache board cannon

Preview:
[ame]http://www.youtube.com/watch?v=Y_NTV8HPVUM[/ame]

But like you see, you can move the camera position to X and Y, but i want it upwards and downwards just like the camera position is (so not when you are facing south, that the camera goes north)

Is there any formule/method to get the position of up/down/left/right ?
Reply
#2

If you're using the GetPlayerCameraPos function, just adjust the Z value ^^

Edit: Or do you mean as in rotating the camera's point to look at (Straight-forward, half-way down and stuff)? Then use SetPlayerCameraLookAt

Note that there isn't a "Get" function for it, so store the parameters in variables if you're going to use them later on.
Reply
#3

I made a Lockheed AC-130U Spooky FS awhile ago but had no use for it. It isn't fully optimized, though I've tested it on a live server and everything seems to work fine.

Just walk up to a Shamal and press G. Since you're the gunner, someone else will have to pilot it (though you could make it work otherwise). And then you just use your up/down and left/right keys to look around and fire to shoot off bursts of minigun rounds.

Anyways, here it is:
http://solidfiles.com/d/975d0/

EDIT: It requires MapAndreas by the way.
Reply
#4

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
If you're using the GetPlayerCameraPos function, just adjust the Z value ^^
But Z is height isnt it ? or will the camera will go up/down if i adjust that ?
Also any idea to adjust left/right ?
Reply
#5

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
But Z is height isnt it ? or will the camera will go up/down if i adjust that ?
Also any idea to adjust left/right ?
Nope, use SetPlayerCameraLookAt. I was kinda confused when you were telling me the problem ^^ (Check my 1st post)
Reply
#6

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Nope, use SetPlayerCameraLookAt. I was kinda confused when you were telling me the problem ^^ (Check my 1st post)
I use that, but X and Y are not always the way the player looks. If the player is facing south as example the camera will go the wrong way. Thats what i mean how to fix that ?
Reply
#7

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
I use that, but X and Y are not always the way the player looks. If the player is facing south as example the camera will go the wrong way. Thats what i mean how to fix that ?
Using GetVehicleZAngle in combination with floatsin/cos?

I might try helping it a hand, add me on MSN if you're interested (Found in my contact details of my profile).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)