Skip to content

Is it possible to set restitution on objects? #336

@fionchadd

Description

@fionchadd

I'm working on a thing at the moment that I want to eventually be like rolling a ball around a pool table.

I've got some of the way there, but when I move the sphere and it hits a wall, it just stays there.

I was wondering if there's a way to set restitution on objects like in matter.js for example? Or whether I need to detect the collision event and try and write the physics myself?

I've looked through various documentation but I'm struggling to find anything.

My codepen here if it's helpful: https://codepen.io/fionchadd/pen/JjzVNOe/4ba15559a770ceda5d9eee881c244b04

Thanks!
Hannah

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions