#(JustinS) get direction of face that player is looking at

14 messages · Page 1 of 1 (latest)

drowsy skiff
#

I'm trying to move blocks using a special item, though to do that I need to get the direction of the face of the block that the player is looking at (only for solid blocks). See the imgs

verbal currentBOT
#

(JustinS) get direction of face that player is looking at

verbal currentBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

drowsy skiff
#

How do I get that direction?

fathom kite
#
- define TRACED_LOCATION <player.eye_location.ray_trace>
- define DIRECTION <[TRACED_LOCATION].block.relative[<[TRACED_LOCATION]>].direction>
#

not too pretty and doesn't work for above and below faces

#

but you'll get the cardinal of the face, so either north,south,etc

drowsy skiff
#

it always returns south

#

I replaced TRACED_LOCATION with
- define block_target <player.eye_location.ray_trace[range=<[equipped_item_script].flag[variables.base_range].mul[<[equipped_force_multiplier]>]>;ignore=<player>;entities=*;return=block]||null>

drowsy skiff
#

<player.eye_location.ray_trace.direction> seems to work, but the top and bottom always return south. I need to exclude top and bottom (make them return null or smth?)

#

adding .vector seems to return the correct vector though

#

I think I can work with that