V
Vanthex
Guest
Hi guys
I used collision_line to determine if a block is between the player and the desired block to be selected (where the lines are pointed at). If there is an obstruction, the player's selection box will disappear (not shown here). For example line A, if I want to reach the block that is under the player, since a block is blocking it, the player can't reach it and therefore the player's selection box will disappear. However for line B, if I want to reach for the block that is on the surface, I am tracing the line to the center of the object, which technically is blocking the line. How do I make an exception that the first object it touches doesn't count as an obstruction? (in line A's case, it means that it will select the grass block that is RIGHT under the player)
I used collision_line to determine if a block is between the player and the desired block to be selected (where the lines are pointed at). If there is an obstruction, the player's selection box will disappear (not shown here). For example line A, if I want to reach the block that is under the player, since a block is blocking it, the player can't reach it and therefore the player's selection box will disappear. However for line B, if I want to reach for the block that is on the surface, I am tracing the line to the center of the object, which technically is blocking the line. How do I make an exception that the first object it touches doesn't count as an obstruction? (in line A's case, it means that it will select the grass block that is RIGHT under the player)