• Create Account

### #Actualtheo2005

Posted 22 April 2012 - 02:55 AM

I can move properly (or at least when I could see the object I could). I'll look up the code for printing text on the screen and then edit this post.
------------------

Nevermind. Bacterius, your formula was wrong. The right formula is:
    LookX = cos(AngleX) * sin(AngleY);
LookY = sin(AngleX) * cos (AngleY);
LookZ = sin(AngleX) * sin(AngleY);


Now a problem, how the heck do I make the camera look at the object?
It looks somewhere else to the point that I have to search for it, even though the camera and object are both at 0,0.

So the object is at 0,0,15
The camera at 0,0,0
and looks at whatever the sin and cos gives me.
If I multiply LookZ with 15.0f, I can make it look at it, but then the camera doesn't move properly for obvious reasons.

What do I do now?

### #1theo2005

Posted 21 April 2012 - 03:11 AM

I can move properly (or at least when I could see the object I could). I'll look up the code for printing text on the screen and then edit this post.

PARTNERS