Godot Version
4.6.3
Question
I hope this question has not been asked before, as it would lead me into despair over my failure to conquer the search engine.
I am currently making a little game for a grade in school, and my player character uses two different CollisionShape2D’s since their phyisque is unique.
But when i jump while facing to the right…
it goes as high as that. but the left works perfectly
The only possible explanation i can figure is that the jumping sprite is alot bigger than any other sprite, since i wanted some more detail for it, and therefore its sized 0.5x but i use animated_sprite.scale = Vector2(0.5, 0.5) and the hitboxes arent the child of the sprite. And the goose also lands normally so that cant be it either.
I have tested it again while writing by turning off one way collision with my platforms and the goose managed to get its head stuck just by jumping into it. My current thought is to switch the collider to a CollisionPolygon2D, but ive also noticed that my right shape has alot of unecessary points. This is my first project so id still like to know what i couldve done wrong even if what i do fixes it.
Enable Debug > Visible Collision Shapes to check what’s happening with the colliders at runtime.
abnormal. i still dont get it
curiously got stuck in that older build instead of being somewhat how youd expect it if it were just sized down
less accurate collision shapes are usually done intentionally both for performance and for game-feel, I’d highly recommend using one collision shape rectangle, it’s very likely the game does not need accurate oddly-shaped collision and would feel better without it
since i doubt ill get any comments that will focus on the problem instead of discriminating against my beautiful freak of nature hitbox converting it to a CollisionPolygon2D solved it
Was it not a CollisionPolygon2D before? Were you using a Convex or Concave collision shape as part of your CollisionShape2D? Those should be the last choice for collision shapes as they will fail in many scenarios and perform the worst. If you tried to use a Convex shape it would fail because your shape is not Convex. Using a Concave shape has a lot of issues and again performs the worst. A CollisionPolygon2D will split itself up into multiple little valid Convex shapes, this should function okay but can get funky at the generated seams.