Irregular Shape Collision Shape

StarckStarck Posts: 9Member

How to effectively put a collision shape on irregular shapes? (e.g. fruits: mango and apples)

Answers

  • StarckStarck Posts: 9Member
    edited April 14

    If I animate a sprite, where the animation involves change in the sprite's size, would its collision shape change size along with the animated sprite?

  • magomagomagomago Posts: 6Member
    Answer ✓

    what you are looking for is a pixel perfect collision detection and it´s not a build in feature (afaik). But anyway, I think there is a way to workaround this. Good luck :)

  • TwistedTwiglegTwistedTwigleg Posts: 79Member
    Answer ✓

    You can use a collision polygon for irregular shapes.

    Collision polygons won't change with the sprite's size though. You might be able to scale the collision polygon, though I haven't had much success with scaling collision shapes/polygons in the past.

    The docs provide a good explanation of the various ways collision works in Godot. Link

  • StarckStarck Posts: 9Member

    Thank you very much magomago and TwistedTwigLeg for your answers. :)

Sign In or Register to comment.