Download

How to check for distance from the player's feet?

Basically I need to do a trace (from the crosshair I suppose) and if it hits world’s surface within a certain radius around player’s feet, then print “Valid” on the screen. If it hits outside of that radius - print “Invalid”.

How would I set this up in Blueprints? Thanks.

P.S. let’s think of it as simple test case scenario - flat floor and nothing around player. Valid radius around player is 128 units.

You could add sockets to the player’s feet bones. Get their location. Then check if that location is within your radius.

I am not too familiar with BP ways and nodes yet :confused:

I figured there gotta be a node for getting player’s location and trace hit should return its location also. And I’d probably subtract those and that would be the current distance from player’s location to the trace hit, which then I could compare to an integer (radius value). I just have no clue what nodes to use and how to lay out a proper flow in BP :confused: