AB4D Forum
Mouse Camera Controller - Printable Version

+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9)
+--- Thread: Mouse Camera Controller (/showthread.php?tid=3938)



Mouse Camera Controller - ZENUAV - 06-02-2015

When I move the scene by alt + dragging the right mouse button (MoveCameraConditions="RightMouseButtonPressed, AltKey"), the scene changes left/right, up/down but the camera heading and attitude does not changed as expected.

How do I store the left/right, up/down positions so I can set them again when the scene is reloaded my app.

This will put the user where they where when they last viewed the scene.

Thanks

Jason


RE: Mouse Camera Controller - abenedik - 06-02-2015

When you move the camera with MouseCameraController, the MouseCameraController changes the camera's Offset property (it is a Vector3D).

So, if you did not manually changed the Offset property, you can simply set it to new Vector3D(0, 0, 0) and it will reset the camera position. If you like some camera position, you can simply save the current value of Offset property and after some time set it back to the saved position.


RE: Mouse Camera Controller - ZENUAV - 06-02-2015

(06-02-2015, 01:04 PM)ZENUAV Wrote: When I move the scene by alt + dragging the right mouse button (MoveCameraConditions="RightMouseButtonPressed, AltKey"), the scene changes left/right, up/down but the camera heading and attitude does not changed as expected.

How do I store the left/right, up/down positions so I can set them again when the scene is reloaded my app.

This will put the user where they where when they last viewed the scene.

Thanks

Jason

That's excellent! Just what I wanted.

I bind the camera offset to my VM and the 3d viewport is maintained between app uses!

Thanks

Jason