Jump to content

Apply rotate and scale to RBD?


CTW

Recommended Posts

Hi, I'm having difficulty controlling the scale and rotation of several objects using RBD sim. 

I can controlling scale by using ident matrix, but if I control rotate, error occurs that the objects changing lager of smaller.

also w attribute is executed separately for rotate, but w attribute and ident scale matrix are not executed at the same time....

Does anyone know how to fix this problem??

Thank you so much if you let me know!

Link to comment
Share on other sites

The `transform` 3x3 matrix intrinsic controls both rotation and scale. If you're assigning rotations based on quaternions, you're going to run into scale issues because quaternions can't contain scale information. The `w` attribute is for angular velocity, not rotation, so it won't help you here.

What you can do is use cracktransform() in VEX to extract the scale from a matrix as a vector, then use the `scale()` VEX function on your rotated matrix to scale it back to the original value, either before or after your rotation (depending on whether you want your scaling to happen in world or local space).

You could also consider using MOPs Apply Attributes to handle this for you.

  • Like 2
Link to comment
Share on other sites

18 hours ago, toadstorm said:

I've been looking for cracktransform, but it's a bit difficult, so i'll have to think about it while looking for examples. 

Thanks to that, I knew how to approach it. I really appreciate it!

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...