setting default camera position when mouse is ENABLED

Return to Code Snippets

setting default camera position when mouse is ENABLED

Postby kespindler » Sat Sep 29, 2012 10:23 am

I'd like to have a default position other than (0,0,0) and still use the default mouse controls (and/or .useDrive() ). How can I do this? I get that disableMouse disconnects a "camera reposition callback" from mouse movement events, but it seems like I should still be able to set a position, since mouse movement is relative.

I also tried disabling the mouse, setting camera position, and re-enabling the mouse, but the position just gets reset to zero again.

How can I set position while the mouse is enabled (and disableMouse() has not been called)? Thank you!
kespindler
 
Posts: 1
Joined: Sat Sep 29, 2012 10:20 am
Location: United States

Postby drwr » Sat Sep 29, 2012 1:30 pm

Try:
Code: Select all
base.trackball.node().setPos(0, 20, 0)


David
drwr
 
Posts: 11425
Joined: Fri Feb 13, 2004 12:42 pm
Location: Glendale, CA


Return to Code Snippets

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests