How to change rigidBody shape

Software: Away3D 4.x

ranoya, Newbie
Posted: 18 April 2013 06:46 PM   Total Posts: 29

Anyone knows if is possible to change the rigidBody´s shape?

The only way I´ve discovered until now is changing the rigidBody´s scale, but in some situations, I´de like to change the shape,  but

rigidBody.shape = anotherShape

is not pssible (ther´s no such setter function)

Thanks.

   

John Brookes, Moderator
Posted: 18 April 2013 08:13 PM   Total Posts: 732   [ # 1 ]

As you say no setter so.
Theres no current way to swap a shape.

Try this,
Add your shape to a compound shape.
Then when you want to swap…
removeAllChildren of the compound and add a new shape to it.
That should work. (possibly/maybe) wink

   

ranoya, Newbie
Posted: 18 April 2013 08:27 PM   Total Posts: 29   [ # 2 ]

Thanks John.

That´s a good idea.

And works.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X