Hi all. Been looking into this for a while without much success so I'll just ask here in case someone knows:
I'm trying to create a type of object that pushes the player away in the Z direction that object is facing. That part is done with an AddForce and Transform Direction where I have the local direction Vector3 with the desired force value on the Z of that Vector3. I then store the result of the Transform Direction and use that vector on the AddForce.
Here's the issue: I want the force to increase the closer the player is to that object.
I thought of doing it with a Get Distance action, store the that result, use a Float Clamp action to set min and max values.
So far so good. But now I wanted that distance range to be translated to the AddForce Vector3.
So for instance - if the distance values were 0min and 200max, I'd want the Vector3 to go from 0,0,200 to 0,0,0 to mirror the distance in realtime. So if the player triggered that force 100 units away from the object it would be pushed by a force of 100.
Is there a way of doing this with playmaker?