-fixed BrickBreaker issue with self collision

This commit is contained in:
Mergul 2021-03-01 12:25:52 +01:00
parent 56f870bac6
commit 9c402140bd

View file

@ -192,6 +192,7 @@ struct BallCollisionSystem
{
bool test(EntityID id)
{
if(id == data.entity[i].id)return true;
Entity* entity = launcher.manager.getEntity(id);
if(entity)
{
@ -311,7 +312,8 @@ struct BrickBreakerDemo
__gshared const (char)* tips = "Brick breaker demo. It's a game about destroying evil bricks.
This demo is usnfinished yet but collision works well. Bricks can be destroyed. Spawning thousands of bricks and then thousands of balls is good way to try demo.
Bricks uses StaticBVH, ball don't collide witch each other, paddle is added to dynamic BVH and collide with balls. But nothing keeps you from adding dynamic collision for balls.";
Bricks uses StaticBVH, ball don't collide witch each other, paddle is added to dynamic BVH and collide with balls. But nothing keeps you from adding dynamic collision for balls.
Currently dynamic collisions are pretty slow as dynamic BVH is rebuilded every frame on single thread.";
//EntityTemplate* tmpl;
Texture texture;