Picking Ellipsoids

Blitz3D Forums/Blitz3D Programming/Picking Ellipsoids

Berbank(Posted 2005) [#1]
Hello all,
I'm trying to do a cameraPick on an ellipsoid. But I can't get it to work. Can someone show what I'm doing wrong? Here is the code:

Graphics3D 800,600


light = CreateLight()
PositionEntity light,20,20,-10

ball = CreateSphere()
EntityPickMode ball,1
ScaleEntity ball,1,2,1
EntityRadius ball,1,20


camera = CreateCamera()


PositionEntity camera,0,0,-5

While KeyDown(1) = False

UpdateWorld
RenderWorld

DebugLog(CameraPick(camera,MouseX(),MouseY()))

Flip

Wend

End

Thanks for any help.


Berbank(Posted 2005) [#2]
Fixed this.

For future refernce use :
EntityPickMode ball,2
instead of
EntityPickMode ball,1

The documentation says that EntityPickMode setting 1 uses the EntityRadius, but it doesn't take into account ellipsoids. Although admittedly it does also say that setting 1 is for Spheres.