YouGroove Posted January 27, 2014 Share Posted January 27, 2014 Could it be possible and how in LE3 : The player could make appear some basic physic shape like box, sphere,cylinder in front of him in the scene, it is possible to detect if it is not enought room to create the physic shape ? Like near a wall you can't create it, on in a small room if it is not enought space ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Christian Clavet Posted January 27, 2014 Share Posted January 27, 2014 I don`t know the exact recipe to do this, but I would do a bounding box tests where you want to create your shape then check if geometry is intersecting or are in the bounding box. If there is nothing, then generate the shape. Quote Link to comment Share on other sites More sharing options...
Rick Posted January 27, 2014 Share Posted January 27, 2014 If you know the AABB dimensions of the shape you want to make, then you can easily do some basic math to see if it would fit. Quote Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 27, 2014 Share Posted January 27, 2014 dont know what exactly you will do but I would just create a shape from codeside http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/shape/ if you need more than one shapes (one equals the model itsself, one is for the offset detection) I would scale the basic shape or create an other shape as offset or use AABB Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
YouGroove Posted January 28, 2014 Author Share Posted January 28, 2014 If you know the AABB dimensions of the shape you want to make, then you can easily do some basic math to see if it would fit. The problem how can you calculate AABB oriented box collision against a complex model collision that could be the level ? You would have to go throught all polygons of level and check if one or none intersect the AABB box. Ok i found something perhaps simple and effective : RAYCASTING -Just calculate 8 cube points non oriented bounding box of geometry to create (cube,cylinder, any shape) - Scale a bit the cube more bigger (security safe collision) - call raycasting on each edges of that bounding cube If something collides with one or more edgeof the bounding cube , you can't create your geometry caus there is collision. Sometimes asking brings the response. Quote Stop toying and make games 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.