Irregular Shape Collision Shape

glancedUpglancedUp Posts: 46Member

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


  • glancedUpglancedUp Posts: 46Member
    edited April 2017

    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: 7Member
    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: 495Moderator
    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

  • glancedUpglancedUp Posts: 46Member

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

Sign In or Register to comment.