Maths problem.

For questions about using Classic.

Post » Fri Jan 27, 2012 11:53 pm

Hi.
I'm making an 3d engine,i managed to get it working but there is still a few things to do, like an camera rotation's.
In math's (Link)which i used to calculate polygon position camera orientation is represented by "Tait-bryan angles", there is x,y and z, and i need someone to help me with converting mouse input to these values, goal is camera moving like in almost every 3d game.
Will be very thankfull for help.

p.s. im not sure about topic category, so just tell me if it's wrong.
B
3
G
1
Posts: 12
Reputation: 499

Post » Sat Jan 28, 2012 7:47 pm

Use can use the change in the mouse position to change the angle.
ex:

always:
-add MouseX-global('oldmousex') to camera_angle_x
-set global oldmousex to MouseX

Then just plug it in to the rotation formula.
B
79
S
24
G
54
Posts: 4,752
Reputation: 40,767

Post » Sat Jan 28, 2012 8:51 pm

Damn, it was so easy :D, i tried that with adding to variable mousex-displayheight/2 but i always got weird values so i thought that will way more complicated than this.
Thanks.Satelita2012-01-28 20:58:02
B
3
G
1
Posts: 12
Reputation: 499


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests