Horde3D
http://horde3d.org/forums/

Knight - "Camera-Flight"
http://horde3d.org/forums/viewtopic.php?f=2&t=955
Page 1 of 1

Author:  SandmaN [ 23.09.2009, 14:51 ]
Post subject:  Knight - "Camera-Flight"

Hi @ All!

Has anyone of you implement an "camera-flight" in the knight example?
(maybe around the knight...)

Which variables do I need to change to which values?

Thankfull for any post... :)


Greetz,
SandmaN

Author:  Volker [ 23.09.2009, 19:26 ]
Post subject:  Re: Knight - "Camera-Flight"

You have to change the camera transformation. Either by using h3dSetNodeTransform or h3dSetNodeTransMat. The values for those functions depend on what kind of "flight" you want. I guess you might want to set some fix points and interpolate between them using a spline function or something like that. For the rotation you could use some lookat calculation to point the camera to the knight.

Author:  Orm [ 26.09.2009, 23:56 ]
Post subject:  Re: Knight - "Camera-Flight"

As far as I know, the camera rotation with the mouse is done by fixing the mouse cursor in the center of the screen (mouse_x = width/2; mouse_y = height/2; something along those lines.) and capturing the distance the mouse cursor moves from the center every cycle and plugging that into your rotation equation. As far as translations are concerned (and even rotations for that matter), you might want to implement a proper scene graph and sync H3D's camera node up with the camera node represented in your graph.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/