#Platformer and edges.

1 messages · Page 1 of 1 (latest)

woven torrent
#

Hello!

I have this problem, that my character can cling to walls even if it's his head or toes. I tried to use a separate Area2D with CollisionShape2D to register whether a player can cling to a wall or not, making it identical to the original player's hitbox, but shorter. It doens't seem to work. What should i do?

Thank you for your time!

violet sluice
#

Can you share your player script?

Are you using is_on_floor?

woven torrent
violet sluice
#

You said the separate Area2D and collision didn't work: What did you do and what did it do?

The on_wall check is always going to use the collision shape of the CharacterBody2D

woven torrent
violet sluice
#

I think your best bet is going to be a shapecast or raycast for wall grabbing. An Area2D is also an option. Either way, you'll need to put in a little bit of work for wall detection instead of is_on_wall()

#

Probably not much though

woven torrent
#

You think Godot Docs should be enough for me to figure out ray casting?

topaz tiger
violet sluice
#

Feel free to ask another question if not

woven torrent
#

Thank you!