About Store Forum Documentation Contact
Donations:
227$/mo



Post Reply 
Chr::angle for Item object?
Author Message
SONB Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
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
Find all posts by this user Quote this message in a reply
Post Reply