Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Moving camera 3D (Read 2776 times)
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Moving camera 3D
Sep 21st, 2011 at 8:31am
Print Post  
I have a 3D diagram
I it is spring layout ( one node in the middle and others are related )

I want the centered node to look as it is not moving even the camera is moving around the spring layout

I am trying to reset the camera before playing
   _CurrentAngle = 0
       dgView3D.CameraPosition = New Point3D(0, 0, 0)
       dgView3D.CameraRotation = New Point3D(0, 0, 0)
       dgView3D.ResetProjection()

but still looks that it is moved a little
any proper solution
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moving camera 3D
Reply #1 - Sep 21st, 2011 at 12:04pm
Print Post  
What is the node's 3D position?
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: Moving camera 3D
Reply #2 - Sep 21st, 2011 at 12:05pm
Print Post  
I don't know as I arrange it by sprint layout
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moving camera 3D
Reply #3 - Sep 22nd, 2011 at 6:39am
Print Post  
What do you expect to happen then if there is no relation between the node's and camera position?

You can set CameraPosition = node.LayoutTraits[View3D.Position] if you want the camera to be located at the node's position in order to look at the surrounding nodes.

If you want the camera to look at this node while pointed at the default direction (CameraRotation), place the camera at the same X,Y as the node, and at some distance along Z. You could loop over all nodes and find their largest Z value, and add some offset to it for the camera position to make sure there are no nodes behind the camera.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Hamdy Ghanem
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 110
Location: Egypt
Joined: Mar 11th, 2009
Re: Moving camera 3D
Reply #4 - Sep 22nd, 2011 at 7:48am
Print Post  
Great , It  works
Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint