I am making a game and I want it so whenever I am touching a wall it does a wall hang animation (solved)

it is a platformer game and I just need code so that when I touch the wall it starts and when I am not touching wall it stops (I already coded wall hang/jump)

1 Like

You can extend the sprite and add an invisible L, like putting a hook on the wall,
i hope this helps!

Use two raycasts, one for both sides, and a third down. If a raycast hits a wall but not the floor, play an animation. If this doesn’t make sense let me know and I’ll make a screenshot.

could you send a screenshot my brain it smol


The sprite is not the problem I need to know how to make it so when it touches the wall it then makes the animation

1 Like

ok, when you hit a wall, raycast right, and 45 degrees up, if right hits and 45 misses. turn on logic gate and make enabled false, when you want to go up, set it to true, and impulse and give it immunity to not collide with the wall. or it wont work,

1 Like

The first (top on the image) ray cast is angled at 180 degrees. The second is at 0 degrees. The last, the one that Ray casts downward, is at 90 degrees. It’s confusing, I know, so sorry! The Raycast angles start to the right which is 0°.

I think you need to use logic gate, and have it to “or”

1 Like

Or if you collide with the wall, you hold pressing forward and press up

1 Like

Yes but then if only the bottom triggers it’ll still play the animation. Collisions are unreliable

if it collides with the bottom, then stop the animation and make it stand then

thank you I will test this out sorry I couldn’t responds sooner I was on vacation

it works great thank you:) also here is a link to the game for you to see and check out what your help did Flowlab Game Creator - New Game and I have one more question is there a way to set it when I press jump as the character is holding the wall to play a wall jump animation, would I use the same code yet it’s a button trigger?

nvm I got it to work but it just looks weird so I’m going to leave it