AnniXa Posted December 15, 2012 Share Posted December 15, 2012 Hey, just wanted to ask if there is a quick way to remove all those body that "fell" out of the worldsize (wich i made with SetWorldSize(...)) Quote Whuts wroong? Link to comment Share on other sites More sharing options...
fumanshoo Posted December 15, 2012 Share Posted December 15, 2012 What I would do is put a plane at the edge of the world and say if EntityDistance (object,plane) <1 then FreeEntity (object) end But i'm a noob, so what do I know haha Quote Link to comment Share on other sites More sharing options...
DaDonik Posted December 15, 2012 Share Posted December 15, 2012 EntityDistance() works on the origin of the entity, so that wouldn't be accurate with such a huge plane. Since the world is just a huge box, all you need is to check if one of the coordinates is near the size of the world in that direction. You could also make a physics box and scale it so it is more or less a plane. Then use the collision callback to free any entity that collides with it. Do that for all 6 sides and you have it. Oh and make sure the physics boxes are inside the world, otherwise it won't work. Quote (Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI) Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.