Hi -
I hadn't seen your post on the games list before replying on the
getting started list. It sounds like that other reply may be
unneeded if you figure out how to allow the user to move the camera.
One fairly simple way I have used does something like this when
xDelta and yDelta are how far the user moved the mouse:
Rb3DSpace1.camera.Position = new Vector3D(0,0,0)
Rb3DSpace1.camera.Yaw -.01*xDelta
Rb3DSpace1.camera.Pitch .01*yDelta
Rb3DSpace1.camera.MoveForward -100
Rb3DSpace1.update
Obviously you would need to adjust the various numbers to get the
responsiveness you want.
Best regards, David
On Jan 4, 2007, at 11:32 AM, tornado at athenet dot net wrote:
The user can move the camera around my object in a circle but it
always
views in the same direction. I want the camera to always be facing the
object which happens to be at the origin. The radius of the circle
is 750.
This is the code for the camera movement:
Zangle=Zangle+.1//a property as double
Rb3DSpace1.Camera.Position.X=Rb3DSpace1.Camera.Position.X//this
line
is not strictly necessary buy I keep it here for consistency
Rb3DSpace1.Camera.Position.Y=(750*(Sin(Zangle)))
Rb3DSpace1.Camera.Position.Z=(750*(Cos(Zangle)))
After that I want the camera to point towards the origin.
What would be even better is if the user could click and drag their
mouse
on the RB3DSpace to move the camera.
I need to keep the object stationary to test for loctions.
Any suggections would be great.
Thanks!
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|