I am programming a game in DirectX7 Immediate and I am having a little problem with proper collision detection.
Now the origin of my object is the middle, so to get the 4 points of a rect around the object I need to add/subtract half the width/depth.
Now my object is rotating:
0 it is pointing right,
90 pointing north sitting directly on the z axis)
180 it is pointing left
270 pointing south on the z-axis
Now, how em I suppose to add the width and depth to the origin x,z when the object is no longer sitting on angle 0.
I realize I need to use trig, but I do not know how.




Reply With Quote