My character has the ability to push and pull different large objects to solve puzzles (similar to Zelda games). Pushing works fine using some basic physics and rigidbodies - I found a script called "pushforce.js" which works quite nicely and is super simple.
Pulling is proving more challenging to implement. I made an FSM which, when shift is pressed, searches for the nearest tagged object and parents it to the character (also causes the character to face the object while moving). This achieves the pulling effect, but rotating the character also rotates the object based on the character's axis, so the object starts swinging around.
I'm wondering if there's a method other than parenting the object to the character. I tried "reversing" the push script by adding a -1 multiplier, but that caused strange results. Is there some sort of method for adding a pull force, towards the center of my character, during a state? Perhaps some sort of gravity?
Just trying to feel out a solution for this, if any of you guys have any ideas I'd be so thankful!