Detect sides of player touch blocks

Discussion in 'Plugin Development' started by NoobDoesMC, Apr 7, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    NoobDoesMC

    How can I check if any part of the sides of the player's hitbox (the front, back, left and right of the player), but not the bottom or the top, are touching non-air blocks?
     
  2. Offline

    MattTheBeast

    Get the direction the player is looking in then check all sides for non air blocks
     
  3. Offline

    NoobDoesMC

    How do I check sides? And why do I need to get the direction first?
     
  4. Offline

    DutchJellyV2

  5. Offline

    MightyOne

    @NoobDoesMC first id say tell us what you actually want to achieve. Why do you need blocks in hitbox face directions.
    @MattTheBeast s idea was quiet good. With the players location, his viewing direction and a bit of cross product you should get locations that resemble the different faces of his hitbox. But guess its better if you start off with your idea in detail.
     
    Last edited: Apr 13, 2018
Thread Status:
Not open for further replies.

Share This Page