Open topic with navigation
<node3d>.setVelocity
Sets the velocity of the node
<node3d>.setVelocity( |
|
[ vx, vy, vz ] |
mode = viz.ABS_GLOBAL |
) |
|
[ vx, vy, vz ]
The velocity vector
mode = viz.ABS_GLOBAL
If viz.ABS_GLOBAL, the velocity will be specified in global coordinates. Otherwise the velocity will be specified in the objects local coordinate frame.
Remarks
Sets the current velocity, which may change due to forces acting on the node.
Return Value
None
Example
viz.phys.enable()
ball = viz.addChild('beachball.osgb')
ball.collideSphere()
ball.setVelocity([0, 10, 0])
See also