A passive AI system(SOLVED)

I need the pig for my game to move side to side, but when it hits a wall, see if the wall is only one block tall and will jump it.If not, turn around and restart.
Does anyone have an idea please?
Here is the code:


I have the side to side part, I just need the jump!

1 Like

Have a raycast positioned 32 pixels above the middle of the pig that points about 64 blocks left or right

Ok that’s a good idea I’ll try it out!