Skip to content

Custom Rigid Body Manipulation

Compare
Choose a tag to compare
@jaipack17 jaipack17 released this 23 Feb 04:47
· 14 commits to master since this release
ba44cf3

Custom Rigid Body Manipulation

  • Removed restrictions for custom rigid bodies.
    • RigidBody:Rotate()
    • RigidBody:SetPosition()
  • Optimized rigid bodies with CanRotate set to false (Avoided 2 loops in RigidBody:Update() and RigidBody:Anchor()).
  • Added RigidBody:SetScale() method as an alternative to RigidBody:SetSize() but only for custom rigid bodies.
    • RigidBody:SetScale(scale: number) - The scale of the default size is 1. Passing in 2 as the scale will double the size of the custom rigid body, etc. Similar to how UDim's scale property works.
  • RigidBody:SetPosition() now works with custom rigid bodies.
  • RigidBody:Rotate() now works with custom rigid bodies.
  • Fixed bug in RigidBody:SetSize(). Earlier RigidBody:SetSize() changed only the size of the GuiObject and not the point-constraint structure.