Ask a Question related to Macromedia Director 3D, Design and Development.
-
SuperTank #1
Rotation with Rigidbody
Hello
I'm having somewhat of a trouble with rotation of a Rigidbody.
You see, I have two models, where one of them uses a Rigidbody. The problem
is, however, that I want that rigidbody to have the same rotation as the model
that doesnt use a rigidbody. I have tried solve this for quite some time
without any luck.
Any ideas?
Thanks. :)
SuperTank Guest
-
Rotation between two transform.rotation vectors.
Hello, I think my subject is pretty straight forward. :) I am looking for a way for my 3D character to slowly rotate between two vectors. The... -
No rotation?
I have a W3D file that I import into Director. There, I can pan, zoom, rotate just fine, but when I preview it in a browser (F12) or publish it, I... -
Havok rigidbody problem
Hi all! I´m having several movablerigidbodys (spheres) that I want to bounce at another movablerigidbody (plane). The thing is that I move the... -
Havok RigidBody Rotation
Hello All. I'm having some problems with the rotation property of a Havok rigid body. According to the Havok Xtra Lingo reference, the rotation... -
Rotation?
im creating a small bullet seen for a movie of mine , and was wondering how i can do angles and rotations on a bullet easily? ie. A bullet flys... -
Mazuho #2
Re: Rotation with Rigidbody
You could try to make the model of the rigidbody a child of the model you
rotate. Make sure you use it with the #preserveworld to not screw up their
positions.
So:
modelA.addChild(modelB, #preserveworld)
I think this should work.
Mazuho Guest
-
Skavengur #3
Re: Rotation with Rigidbody
It's been a while, and I don't have director in front of me to check the
syntax, but I believe something like this might work for you:
desiredRotation = plainModel.transform.rotation.axisAngle
rigidBody.rotation = desiredRotation
and run that everyframe or whenever is appropriate to keep it updated. Hope
that helps some....
Skavengur Guest
-
hondo3000 #4
Re: Rotation with Rigidbody
hi,
you should keep in mind that a havok body should be only conltrolled with the
havok comands! the havok world is inside the havok castmember and it is
invisible. the objects in the visual world only a representation of things
happening in havok-land. That means, if a model is turned into a havok model,
it should not be manipulated with normal lingo comands.
The havok bodies should be moved by forces, impulses, angularvelocity,
linearvelocity ... (all in the havok-lingo-reference)
It's possible to set the rotation and the position of a havok body with
havok-lingo-comands, but in setting the position and rotation without the use
of forces, will exclude the model from the collision detection. Using
"rotation" and "position" is in this case similar to "beam" the object to a new
position by ignoring the physical rules.
but to stick a object to a lingo controlled model you can use dashpods. If you
use a angular dashpod, you can update its rotation and set it to the rotation
of the lingo-controlled model. By making this agualar dashpod very strong, it
will try to be very close to the given rotation.
this is not a good idea because it will not move the havok body, only the>modelA.addChild(modelB, #preserveworld)
visual representation. The havok model will not move. havok models can only be
moved by havok comands.
this will work, but exclude the collision detection.>desiredRotation = plainModel.transform.rotation.axisAngle
>rigidBody.rotation = desiredRotation
Apply a angulardashpod to that havok model and set its rotation like this:
rot=pWorld.model("sourcemodel").getworldtransform( ).axisAngle
pHavok.angulardashpot("nameofdashpot").rotation=ro t
this should work. depending on the strenght of this dashpot, the motion will
be applied. You should also take a look into the havok-lingo-reference on how
to use "registerstepcallback" to build a handler that will execute the
havok-code on havok timesteps.
hope this is a littel help...
hondo3000 Guest



Reply With Quote

