Rotating Colliders using Motors

Image by Matt Oxley. Autodesk Maya 2018, V-Ray 3.6, Adobe After Effects CC2018.

Q: Rotating colliders in MASH Dynamics. How does that work?

A: There's more than one way to tackle this but one of the most stable techniques is to use motors.

  1. Create a large(ish) Sphere. This is your collider.
  2. With that Sphere selected, create a MASH network with a Point Count of 1.
  3. Add Dynamics node.
  4. Set Collision Shape to Mesh.
  5. Set Mass to something very high (we've used 1000)
  6. On your Dynamics node, scroll down to the Constraints section.
  7. Right click in the window and choose Create.
  8. Double click the Constraint you've just created.
  9. Set Type to Custom
  10. Set Connection Mode to Connect to Point
  11. Open the Motor rolldown
  12. Under Rotational Motor check Enable and set a Target Speed for one (or more) axis.
  13. Open the Limits rolldown
  14. Set all Positional Limits to Fixed and set the Rotational Limits you are not animating (from step 11) to Fixed.
  15. Press play. You should see your Sphere rotating in place.
  16. Create a smaller Sphere
  17. With that Sphere selected, create a MASH network with a Point Count of 10.
  18. On the Distribute node set Distribution Type to Volume
  19. Add a Dynamics node
  20. Press play. 

Tip - if you have a lot of objects inside your Sphere then, in a Dynamic sense, they're heavy (depending on your Mass settings). If your collider is struggling to turn due to that weight you might need to increase Maximum Force under the Rotational Motor rolldown. Think of this as torque. The higher it is the more power your motor has and so will reach its Target Speed more quickly (and be able to maintain it).

Download an example file here (requires Maya 2018)