![]() |
|
#1
|
|||
|
|||
Here's another way to do it.
Code:
from viz import * go() clearcolor(.8,.8,.8) vert = add('ball.wrl') vert.translate(0,1.8,2) xang = 0 yang = 0 INCREMENT = .5 mouse(OFF) restrictmouse(OFF) def mousemove(x,y): global xang,yang state = buttonstate() if state == MOUSEBUTTON_LEFT: xang = xang + x*INCREMENT yang = yang + y*INCREMENT vert.rotate(0,1,0,-x*INCREMENT,RELATIVE_WORLD) vert.rotate(1,0,0,y*INCREMENT,RELATIVE_WORLD) mousedata(RELATIVE,RELATIVE) callback(MOUSEMOVE_EVENT,mousemove) |
#2
|
|||
|
|||
Interesting... I shall dub thee Spinner Metaphor Method and place you in a file of honor.
__________________
Paul Elliott WorldViz LLC |
#3
|
|||
|
|||
Hi Gladsomebeast, the effect of slight roll results in the lookat call. The second argument is a optional roll value. The internal value of viz.ABS_GLOBAL is 4:
Code:
node.lookat(intersectionItem.point, 0, viz.ABS_GLOBAL) Code:
node.lookat(intersectionItem.point,viz.ABS_GLOBAL) Code:
node.lookat(intersectionItem.point,4) |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
retrieve Object names | Geoffrey | Vizard | 11 | 12-11-2009 04:26 AM |
reseting an object | durf | Vizard | 3 | 03-17-2009 11:48 PM |
Object rotating around world axis, not own axis | tacbob | Vizard | 1 | 02-15-2007 09:12 AM |
Child Object Rotation | paulgoldberg | Vizard | 5 | 09-05-2006 11:33 AM |
rotate to object | jargon | Vizard | 1 | 08-08-2005 12:20 PM |