SplatJS / splat-ecs

MIT License
12 stars 3 forks source link

add basic collision resolution #65

Open AlexBezuska opened 8 years ago

AlexBezuska commented 8 years ago

Add basic collision resolution (intirim solution) does not use the new "collisions": {} we talked about, this is for existing "collisions": [] components. This will make the tutorial game much easier.

Introduces the concept of "body" by requiring a "body" component on any "collidable" entity that the developer wants to resolve collisions. This is similar to the Unity concept of "rigidBody" which is an entity that is "solid" in the game.

trackLastPosition and resolveCollisions added lastPosition is added as it's own components like int he tutorial game, this can be updates once we have "collisions":{} working.

Tested with starter project and works well.