Setting RigidBody position rotation from model

Software: Away3D 4.x

John Brookes, Moderator
Posted: 22 October 2011 11:24 AM   Total Posts: 732

Just trying to get a way for the rotation and position to be set
Seems to work

AWPRigidBody.as

public function AWPRigidBody(shape AWPCollisionShapeskin ObjectContainer3D nullmass Number 0{
 
if (skin)
 
{
  
var rot:Vector3D = new Vector3D(skin.rotationXskin.rotationYskin.rotationZ);
  var 
pos:Vector3D skin.position;
 
}
 
 pointer 
bullet.createBodyMethod(thisshape.pointermass);
 
super(pointershapeskin);
 
 if (
skin)
 
{
  this
.rotation rot;
  
this.position pos;
 
}
//... 
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X