Horde3D

Next-Generation Graphics Engine
It is currently 29.11.2024, 18:44

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Knight - "Camera-Flight"
PostPosted: 23.09.2009, 14:51 
Offline

Joined: 15.04.2009, 11:52
Posts: 2
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


Top
 Profile  
Reply with quote  
PostPosted: 23.09.2009, 19:26 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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.


Top
 Profile  
Reply with quote  
PostPosted: 26.09.2009, 23:56 
Offline

Joined: 09.09.2009, 18:58
Posts: 107
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group