I’m using the distance to an object to determine which layer it should be displayed on, but I can’t seem to get it to work right. Testing the code while in the editor makes it seem like the equations are correct but it just doesn’t work
Display code is in “display_car” and “display_wall”, the distances are sent by “game_player” and “game_car” respectively
Ah okay, my suggestion with this is to shoot a single raycast to the player set to “stop at first object”.
If it can hit the player, then make the use normal display order.