[Bf-python] radius of collision sphere

Jacek Popławski jpopl at interia.pl
Tue Apr 27 11:55:00 CEST 2004


On Mon, Apr 26, 2004 at 03:03:08PM -0400, Gilbert, Joseph wrote:
> The object and mesh datastructs have a bounding box member that contains
> the 8 points that make up the bounding box for the object. This is not
> currently accessable through the api.

Are you sure? At least function exists.

> If the bounding box itself is not good for collision detection, with the 8
> points that make the top and bottom of the box could be used to calculate an
> arc which could lead to a sphere calculation. 

Calculating sphere radius in algorithm is not so hard. But I need to define
sphere by hand. That's why it would be very helpfull to add new type of object
(real sphere), move and scale it, then get center and radius.

Dirty hack described in other post (about creating mesh sphere and taking its
radius/center) may work as temporary solution, but I wonder how hard it will be
to make it correctly. Is it possible by modyfing a little just Python API,
without moving into Blender internals? (Sorry if this question is stupid :)

-- 
Free Software - find interesting programs and change them
NetHack - meet interesting creatures, kill them and eat their bodies
Usenet - meet interesting people from all over the world and flame them
Decopter - unrealistic helicopter simulator, get it from http://decopter.sf.net



More information about the Bf-python mailing list