www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: zammbi on October 15, 2010, 08:09:30 am

Title: Getting the bounds of the world
Post by: zammbi on October 15, 2010, 08:09:30 am
How does one get the bounds of the whole world? I want to make it so if a user gets a glitch(fall through a polygon), which they end outside of the map, it warps them back.

So I need to check on the bounds of the whole world. I guess the bounds could change from the character(or any other movable thing) but I'll take a snapshot when the level has loaded.
Title: Re: Getting the bounds of the world
Post by: EgonOlsen on October 15, 2010, 02:09:31 pm
If the level is one single object, you can get its bounding box in object space frim its Mesh. If all yoz want is to check if the player fall through the ground, why not just guess some value that is good enough? You actually don't need the exact value, do you?
Title: Re: Getting the bounds of the world
Post by: zammbi on October 15, 2010, 02:39:53 pm
Quote
If all yoz want is to check if the player fall through the ground, why not just guess some value that is good enough? You actually don't need the exact value, do you?
Yeah I do that currently. But I want to also want to use it to stop people from walking outside the map too(walls).

Quote
If the level is one single object, you can get its bounding box in object space frim its Mesh.
Yeah I guess I could merge everything and probably would do the trick for now. Thanks.