Sphere collision and radius

Started by quixote_arg, January 18, 2006, 08:59:22 PM

Previous topic - Next topic

quixote_arg

Hi, I have a question.

I've created an sphere Object3D with the Primitives class. Something like:

Object3D bullet = Primitives.getSphere(0.5f);

When I want to try collision of that object, naturally the checkForCollisionSpherical method seems to be the most appropiate.

However: the checkForCollisionSpherical takes a float as a radius but the getSphere method of the Primitives class takes a float with the scale of the sphere.

How are these two values related with each other?

I mean: what is the radius for a sphere created with Primitives in order to make the collision sphere optimal?

Thanks

EgonOlsen

Quote from: "quixote_arg"
How are these two values related with each other?

I mean: what is the radius for a sphere created with Primitives in order to make the collision sphere optimal?
They should correlate, i.e. a scale of 5 should result in a radius of 5 for the collision detection.