How do I make a blueprint object move away from another object?
I have been trying to code in Blueprint for 5 or so hours now, with and without physics being applied (using VInterp for the non-physics attempt) to make a character object move away from another object, when the character overlaps it. "Away" meaning the direction from the sphere's centre to in the direction that the player is currently in from the sphere's centre. Help!
asked Apr 30 '19 at 04:38 AM in Blueprint Scripting
The most basic implementation would look something like this:
You can see them getting stuck if blocked by something else, you did not include any details so not sure if this is a desired behaviour for you case.
You can, of course, implement this in the character and have it push objects away from itself instead.
For a physics based approach, it'd be enough to give them an impulse in the appropriate direction, much simpler solution.
Follow this question
Once you sign in you will be able to subscribe for any updates here