radar for spaceshooter
hi
anyone knows the radar displays from privateer or wing commander?
the middle of the radar screen is in front of you, the farer its away from the center the farer you must rotate to face it. a point in the most outer region is behind you. (dont know if anybody understands this...)
i know the position of my spaceship, the rotation(quaternion) and the same of the spaceship to display on the radar.
i can calculate the distance from the radar center to the displayed point by the dot product of the direction-vector of my spaceship and the vector from my spaceships position to the position of the other spaceship.
but i dont know how to calculate the angle to rotate the point around the center.(if the other spaceship is left/right/up/down)
hope somebody can help.
You´ll have to get the angle between the heading of the radar and that of the other ship:
It you should be in 2d, it´s just the same....We just remove z from all calcs....
|
It you should be in 2d, it´s just the same....We just remove z from all calcs....
delete this;
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement