Jump to content

Simple way to remove body that are out of the world?


AnniXa
 Share

Recommended Posts

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.

(Win7 64bit) && (i7 3770K @ 3,5ghz) && (16gb DDR3 @ 1600mhz) && (Geforce660TI)

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...