Setting vehicle facing angle
#1

What is function to set vehicle facing angle?
Reply
#2

SetVehicleZAngle
Reply
#3

Hmm, it doesn't work ://
I set to 90.0, but vehicles is facing to the north, not west

Image:
http://slike.hr/slike/samp864_52cc9.png.html

Part of code:
pawn Code:
SetVehicleZAngle(Grupa1[1], 90.0);
SetVehicleZAngle(Grupa1[2], 90.0);
SetVehicleZAngle(Grupa1[3], 90.0);
SetVehicleZAngle(Grupa1[4], 90.0);
How to fix it?
Reply
#4

I do not think you did, but if you have entered the clothing room in The Johnson House, and then go back, they will also face to the north. But Like I said, I do not think you did.
Reply
#5

90 is north, 180 is west if im not wrong.
Reply
#6

Just try some other values, like 0 and 180. Also make sure you are using the right vehicle ids.
Reply
#7

0 degrees is north, 90 is west, 180 is south and 270 is east.
Reply
#8

Make sure you are using the correct vehicle IDs. Also, where are you using the function?


This forum requires that you wait 120 seconds between posts. Please try again in 43 seconds.
Reply
#9

Vehicle IDs are 100% correct.
I'm using it in command for event vehicles teleporting.

@PowerPC603
You can see that I'm set 90.0 for west, but vehicles are facing to north.
Reply
#10

Refresh!
Reply
#11

Quote:
Originally Posted by Pooh7
View Post
Refresh!
How old is this??

Im having the same bug.

I set ZVehicleAngle with the right vehicleid and is facing anywhere but where I want to.

I have to destroy and create the vehicle again for it to face the right direction.

EDIT:

I've found that I have to be inside the vehicle to properly set it's angle. If I go inside the vehcle and change the ZAngle it has no problems. If I leave the vehicle and try to set Zangle it will just rotate a few times and then it gets stucked.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)