Raycast is not working

I want to make an object that moves in the opposing direction when another object is touching it but it is buggy and it sometimes detects things that aren’t there

here is the game https://flowlab.io/game/play/2679593
if anyone has a solution then pls respond

So, if I am understanding this right, you want something to move away from an object? You had the right idea, but some of the angles of the raycasts were set wrong. :slight_smile:

2 Likes

ok i will try this and get back to you

found the problem with my code thank you

1 Like