WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   about setMotorAngle (https://forum.worldviz.com/showthread.php?t=4157)

amaze12 02-29-2012 08:57 AM

about setMotorAngle
 
Hello ,

I just tried the fowllowing code.

import viz
viz.go()

ball = viz.add('ball.wrl',pos=(1,1.8,5))
ball.collideSphere()

ANCHOR_POS = (0,1.8,5)
viz.add('white_ball.wrl',pos=ANCHOR_POS) # Anchor Model

joint = viz.phys.addHingeJoint(ball,None,pos=ANCHOR_POS,ax is0=[0,0,1])
joint.setMotorAngle(0,90,.26,1)

import vizcam
cam = vizcam.pivotNavigate()
cam.setCenter(1,1.8,5)
cam.setDistence(1)

So I have a ball in view, and I can rotate it with my mouse, and if I rotate it upward or downward, the ball rotation is limited. I think maybe the angle are limited by the second argument (90) in setMotorAngle. But when I tried to change the number, for example, to 1 or 10, nothing changed.

Please tell me what's wrong?

Or if this setMotorAngle cannot work like this. Which function can?

Thank you.


All times are GMT -7. The time now is 09:47 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC