We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Zero Physics Collision Margin for Meshes

Home Forums Bug Reports and Feature Requests Zero Physics Collision Margin for Meshes

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #63514
    Thomas Fabini
    Customer

    Hi guys,

    I’d like to place a feature request, since, arguably its not really a bug but rather a missing setting.
    The details are discussed with kdv’s input here:
    Physics collision margin

    As far as the findings went, all collision primitives have a zero collision margin setting while mesh collision objects don’t.

    Since it’s crucial for precise collision detection in most projects, I use geometry.setMargin(0) for mesh collision objects in puzzles.min.js (which gets lost when updating, obviously).

    I think this could be generally set since all other collision objects have zero margins.
    As an additional feature, setting the margin could be part of the physics “apply”-puzzle. I didn’t encounter any situation where I needed another setting than “0”, but others might need it.

    Thanks,
    Thomas

    #63523

    Hi, I’m going to add this task to our TODO list.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #63531
    Thomas Fabini
    Customer

    Hi Alexander,

    Thanks a lot for looking into this.

    #63952
    Thomas Fabini
    Customer

    A short addition to my previous post:

    I did actually encounter a situation where I needed non-zero collision margins lately:
    Trying to stabilize a physics simulation with small objects (around 10cm / 0.1 BU) gaining some speed by falling, I had to modify (raise) the value for the margins. With a zero margin the mesh collision objects where passing right through the floor.

    Considering this, it might be actually beneficial being able to set specific collision margins for physics objects (mesh and primitives).

    The only thing that actually helped, was setting the collision margin in combination with applying high angular and linear damping to reduce the speed.

    I do not know if this is a proven way of stabilizing physics collisions with ammo.js, but up to this point I haven’t found another solution – open to any suggestions, as usual.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.