Detecting player direction

so this is really simple 4 direction detection but if you want the angle the player is heading in too then that’ll be a different story i’ll include later

moving on

guide

first step place down a player coordinates device
and 4 player scoped number properties (configure to your needs if needed)


and set the coordinate device to update the normal ones (the “d” means they’re delayed) and broadcast on “delayed coordinates” leading us to a 0.25 delay trigger that trigger on that channel (configure to no collision/not visible as needed) with a block setting the delayed props to the current props

then place a text game overlay (playerscope if needed) with this block
triggering on “delayed coordinates”
but do not get confused as this gameoverlay will update normally everytime the players’ coordinates change

full system should look like this so don’t go accidentally building a whole ah castle thinking you missed a piece :p

and before you ask “what is the use of this guide?”
it is mainly for pseudo items with collision or atleast a piece of what’s needed to be able to make the physics of it (so it can tell which direction to go in once the player tries to push it or something) as for the angles for more accurate collision i’ll figure it out later as mentioned (if I get angles figured out pseudo gadgets might be possible with a bit of keybinding and distance formula’s for the hitbox)

8 Likes

i’d say this is a good guide!

2 Likes

With this we could make psuedo hitboxes but if you think about it, we could make custom keybinds. Imagine moving up but you go left, or moving left but you move down or something

1 Like