Sign in to follow this  
Followers 0
NAIL

Direction??

4 posts in this topic

What Database column is direction azeroth?  I want to spawn in a vehicle in a certain place facing a certain direction, so I parked it there to copy the database criteria, but it has 3 columns.  direction_x, direction_y, direction_z.

 

I see _x and _y are populated on an AVS vehicle spawned in, so I am assuming it is a combination of both??   Both are numbers <1 and >.360 so I am not sure how to check this.  Maybe just compass direction in game?

Share this post


Link to post
Share on other sites
Advertisement

Get in, face where you want it to face, logout

Goto players, copy coordinates, apply on vehicle.

WIN

Share this post


Link to post
Share on other sites

Although the above will indeed work, anyone wishing to do this in code will need to know the direction is stored as a vector, not as angles, to get the heading you'd need to do something like this (Assuming the z axis is up)

atan2(direction_x, direction_y)

This will return the heading in "radians", to get it in something more useful like degrees you'd need to do the following

atan2(direction_x, direction_y) * 180 / π

Hope this helps!

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.