WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-29-2012, 08:57 AM
amaze12 amaze12 is offline
Member
 
Join Date: Feb 2012
Posts: 7
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.
Reply With Quote
Reply

Tags
motor

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:57 PM.


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