The pull towards mechanic (also called Grapple Pull Object) pulls objects towards the character! The pulling has some parameters that can be tweaked, with optional overrides per object being pulled.
Example Usage
Right click to pull orange objects, left click to grapple to blue objects!
Setup
Download all the mechanics on the Getting Started page
- Set up a Query to use this mechanic with, then drag GrapplePullObject.cs script (located in Scripts/CharacterMechanics/TopDownMechanics) onto the game object with your query.
- Keep in mind that all objects that can be queried by your query will attempt to be pulled, however, only objects with RigidBodies are pullable. If the query finds an object without a RigidBody, it will send an error in the output. This is intentional.
- To avoid this, set the Allowed Layers on your query to just a layer inhabited by your pullable objects.
- Each object that can be pulled can also have a separate Pullable Item Overrides script attached to it to override each property on a per item basis
- Currently the character can only pull objects on the same vertical plane as it. This may be changed in the future.
Customization
Properties
-
- Querier – The query to use to pull objects
- Pull Time – How long to pull the object for
- Pulling Speed – How fast to pull the object
- Follow Grappler – If true, the object will follow this transform until it reaches this. It is recommended to only use this if you are pulling triggers.
Events
-
- PullStarting<RigidBody body> – Fires right before a RigidBody starts being pulled
- PullFinished<RigidBody body> – Fires right after a RigidBody stops being pulled
Caveats/Bugs
- None known at this time.

