1 decade ago
by Kxen
Hi,
I'm trying to create a trigger which kills Box2D entities that go into it I but can't get it to work. I've realised I cannot do it the traditional way with checkAgainst since Box2D handles collisions differently but I don't know how to do it otherwise.
Any ideas?
Thanks.
1 decade ago
by Kxen
Bumping this one since it's really crucial for my game and I can't continue without it.
All I want is to kill the entity when it reaches a certain point. I could even settle for killing it when the X or Y position is above/below a certain value but I cannot even do this since pos.x/y won't work on Box2D entities.
Help please. :)
1 decade ago
by Ashims
I'll prefix this by saying I've only been playing with impact for a few days.
Presumably your trigger entity isn't a box2d entity hence the lack of collision detection. What happens if you enable both normal collisions AND box2d ones on your entity (ie. changing entity.collides)?
Otherwise you can always do something like...
if(this.distanceTo(playerEntity) < numberOfPixels){
playerEntity.kill();
}
in the update method of the trigger entity. Might cover you until someone can give you something more certain.
Page 1 of 1
« first
« previous
next ›
last »