Skip to content

Improvements to :ApplyForce(). New events & methods

Compare
Choose a tag to compare
@jaipack17 jaipack17 released this 30 Nov 12:02
· 56 commits to master since this release
e2fcffa

New Events, Methods and Improvements

  • Added new events to Engine
    • Engine.ObjectAdded - Fires when a new Point, Constraint or RigidBody is created.
    • Engine.ObjectRemoved - Fires when a new Point, Constraint or RigidBody is destroyed.
  • Added new methods to RigidBodies
    • RigidBody:GetTouchingRigidBodies() - Returns all RigidBodies that are in collision with the current RigidBody.
  • API Changes to Point:ApplyForce() and RigidBody:ApplyForce()
    • Added a second optional parameter 'time'.
    • The time parameter can be used to apply a force for a certain amount of time.
    • Example: Body:ApplyForce(Vector2.new(.4, 0), 3) -- applies the force for 3 seconds