Faulty collisions?

ismeedoismeedo Member Posts: 1

I'm trying to make an educational game which shows the kinetic theory (tiny gas particles bouncing around inside a container). I've created the particles (balls with bounciness set to 1 and circular collision shape) and 4 walls (rectangles which are not moveable and also have bounciness set to 1 but rectangular collision shape). I've also set friction to 0 for all objects. When the 'particle' collides with the wall at high speed, there's no problem but at low speed there is - let's say it collides with a wall with an X velocity of 100 and Y velocity of 10. After the collision, the Y velocity seems to be zero so, with more than one particle within the walls, eventually several of them end up clinging to the walls (moving parallel to them). Ends up not looking very realistic - any fixes which might help?

Cheers

Comments

  • dgackeydgackey Austin, TXInactive, PRO, Chef Emeritus Posts: 699

    Can you send us your project? We've heard of a few other odd issues with the physics simulation, so it's good to have a working repro case we can use to help isolate the issue.

    Dan Magaha · COO · GameSalad, Inc · danm@gamesalad.com

  • SocksSocks London, UK.Member Posts: 12,822

    @ismeedo said:
    I'm trying to make an educational game which shows the kinetic theory (tiny gas particles bouncing around inside a container). I've created the particles (balls with bounciness set to 1 and circular collision shape) and 4 walls (rectangles which are not moveable and also have bounciness set to 1 but rectangular collision shape). I've also set friction to 0 for all objects. When the 'particle' collides with the wall at high speed, there's no problem but at low speed there is - let's say it collides with a wall with an X velocity of 100 and Y velocity of 10. After the collision, the Y velocity seems to be zero so, with more than one particle within the walls, eventually several of them end up clinging to the walls (moving parallel to them). Ends up not looking very realistic - any fixes which might help?

    Cheers

    In the real world the angle reflection never perfectly mirrors the angle of incidence, for example a pool ball heading towards the cushion at 45° should (in theory) reflect at 135°, but the tiny amount of friction from the interaction with the cushion will reduce the angle to - for example - 134.99, the same is true in GameSalad, actors with friction set to anything above 0 will (correctly) reduce the velocities involved in the interaction, try turning the friction for both actors to 0, it might not completely solve the issue but it can often really help.

Sign In or Register to comment.