-fixed BrickBreaker issue with self collision
This commit is contained in:
parent
56f870bac6
commit
9c402140bd
1 changed files with 3 additions and 1 deletions
|
|
@ -192,6 +192,7 @@ struct BallCollisionSystem
|
||||||
{
|
{
|
||||||
bool test(EntityID id)
|
bool test(EntityID id)
|
||||||
{
|
{
|
||||||
|
if(id == data.entity[i].id)return true;
|
||||||
Entity* entity = launcher.manager.getEntity(id);
|
Entity* entity = launcher.manager.getEntity(id);
|
||||||
if(entity)
|
if(entity)
|
||||||
{
|
{
|
||||||
|
|
@ -311,7 +312,8 @@ struct BrickBreakerDemo
|
||||||
__gshared const (char)* tips = "Brick breaker demo. It's a game about destroying evil bricks.
|
__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.
|
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;
|
//EntityTemplate* tmpl;
|
||||||
Texture texture;
|
Texture texture;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue