SONB
Member
|
Chr::angle for Item object?
Hi, Esenthel!
I'm trying to set up the camera to follow my ship. As an example I took the VIEW_TPP from Bloody Massacre.
My problem is: you insert plr.angle.x and plr.angle.y into Cam.setSpherical() and my doesn't have "angle" because it's an Item, not a Chr. I tried to calculate the angles myself but failed. Maybe you could give me some hint how you calculate the "angles" for a Chr object?
Thanx a lot in advance!
|
|
04-21-2009 02:06 AM |
|
Esenthel
Administrator
|
Re: Chr::angle for Item object?
This code converts a matrix to an angle on XZ plane
Flt angle=Angle(matrix.z.xz())-PI_2;
|
|
04-21-2009 09:35 AM |
|