I wish i could see Collision Spheres

Blitz3D Forums/Blitz3D Programming/I wish i could see Collision Spheres

nerdy_kid(Posted 2008) [#1]
Would'nt it be great if blitz had a feature where you could see the collision sphere, like in EntityRadius?
It would save a lot of time, trying out the collisions.


big10p(Posted 2008) [#2]
Just parent an alpha'd sphere to the mesh, scaled to the size of the collision radius.


WolRon(Posted 2008) [#3]
That's a lot of overhead (drawing a sphere). A slightly more complex but processor efficient solution would be to draw a 2D circle, such as how games like Mario 64 drew 'spheres'.

It's too bad that Blitz can't do this automatically.


big10p(Posted 2008) [#4]
Well, I only meant it to be used during development, obviously. ;)

Plus, calculating and drawing a 2D circle on a 3D scene would probably be slower, anyway.


WolRon(Posted 2008) [#5]
Yes, I also meant during development.

And I didn't mean drawing a 'circle' really. I meant to draw a 2D image of a circle, perhaps using quads. I'm certain it'd be faster.

It just depends on how much need there is for the extra programming work to implement it. If you needed to visualize a lot of collision spheres, the 2D method might be a better option than drawing actual spheres.


sswift(Posted 2008) [#6]
I wish there were real dinosaurs!


Ross C(Posted 2008) [#7]
Parent a sprite to the mesh, textured with a circle. always facing the camera. Can't get any less over head than that. Make it single surface quads if your really worries about speed. But since it's a dev thing, wouldn't really see much of a need for too much speed worry.


nerdy_kid(Posted 2008) [#8]
big10p "Just parent an alpha'd sphere to the mesh, scaled to the size of the collision radius. " - I didn't know that a collision sphere and a normal sphere would be the same size, for some reason I thought they were scaled differently. Dumb me. And by the way, how do you put italics in these posts?


nerdy_kid(Posted 2008) [#9]
Oh, never mind, i found the forum codes.


Ross C(Posted 2008) [#10]
Every unit attached to blitz entity commands refer to the unit blitz uses for 3d space. Word of warning though. If you enetity is the CHILD of another, and the parent is scaled, your child entities unit will be relative to that scale.

For example, you scale a cube by 0.5. Then you parent a sphere to it. CUBE = Parent, SPHERE = child.

You try moving that sphere 2 units, and it will only one 1, because the child's local world, is scaled by 0.5. You can use GLOBAL flags on most entity commands though, to override this.