Introducing a rotation offset into a link
I am working in a immersive VR simulator, and I am picking up and moving objects around.
Grabbing an object is pretty easy: Code:
grabLink = viz.link(hand,object,1) I can also modify the link to act in a couple different ways by modifying the link like so: Creating a 'locked rotations' link (the grabbed object follows the translations of the hand, but it's orientation is locked at [0,0,0] exactly) Code:
grabLink.setEuler([0,0,0]) #set the yaw, pitch and roll to zero Code:
yPos = object.getPosition()[1] #y position of object grabLink.clampPosZ([None,zBound],1,viz.LINK_FULL_OP) #clamp item's forward motion Ok, so all that is working well and good. But now I need to 'offset' the position of the object vs. the hand with a set of offsets Code:
rotationOffsets = [x,y,z] |
I think you're looking for something like this:
Code:
positionOffsets = [x,y,z] |
All times are GMT -7. The time now is 09:40 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC