phoboslab / Impact

HTML5 Game Engine
MIT License
1.99k stars 204 forks source link

Prevent specific entities from sliding or being pushed upon collision on weaker vs stronger types. #63

Open rontrek opened 5 years ago

rontrek commented 5 years ago

I'm trying to make a game that does not involve any sliding physics or pushing entities and I can't figure out how to prevent sliding when entities come in contact with each other.

Is there a particular setup that can prevent this on all or certain type of entities?

Joncom commented 5 years ago

Shouldn’t entities not be colliding, pushing, or sliding by default? I thought ig.Entity.collides is configured to NEVER by default...

rontrek commented 5 years ago

I know, sorry if that was not clear and will update the title subject. What I'm talking about is when a collision mode is now set to the weaker vs stronger types. Is there a way to disable sliding?

Joncom commented 5 years ago

Not sure what you mean by “sliding”. Can you post a video capture (GIF) or something?

rontrek commented 5 years ago

More like bounciness if that's what it's called where an entity bumps and collides into a stronger type entity like FIXED type, the entity drifts back or in the opposite direction.

btw, I have tried bounciness set to 0 and it still bounces back.