GLBasic forum

Main forum => GLBasic - en => Topic started by: mentalthink on 2009-Oct-01

Title: Moving camera
Post by: mentalthink on 2009-Oct-01
Hi, I?ve got a question about the movement of the camera:

How I can move a camera trought her local axis, always a move a camera if apply an increment in x, the camera always follow the way in line, but I want to watch to any point and move to this point (target of camera) when a push a key.

Thanks.
Title: Re: Moving camera
Post by: Hemlos on 2009-Oct-01
A sample:
This will follow your coordinates, and point to z+100 direction
x_camera x,y,z,x,y,z+100


Additionally, you can rotate around the center point with SIN and COS math.
Title: Re: Moving camera
Post by: Schranz0r on 2009-Oct-01
Take a look into the EntitySystem:

http://www.glbasic.com/beta/entity.rar
Title: Re: Moving camera
Post by: mentalthink on 2009-Oct-02
Thanks Schranz0r!!!.

This is just I want.

Thanks again for your time!!.

Best regards 
Title: Re: Moving camera
Post by: bigsofty on 2009-Oct-02
I have my own camera (class) that I will post tomorrow, with lots of helper functions to manipulate the camera.
Title: Re: Moving camera
Post by: mentalthink on 2009-Oct-14
Thanks bigsofty, will be a great apport, because this little thing is complicated for me.

Thanks again, and excuseme for no reply before.