collision radius
Blitz3D Forums/Blitz3D Programming/collision radius
| ||
i'm confused about entityradius. previously there was only the x parameter. i guess it made a sphere with radius x. now we have a y parameter. that's nice, but without also an z parameter i'm confused as to what the collision area actually looks like. watch, i'm trying to show myself the collision radius, and defining it too (note you have to have a centered mesh for this to work, so included both routines) Function centerMESH(entity) FitMesh entity, -(MeshWidth (entity) / 2), -(MeshHeight (entity) / 2), -(MeshDepth (entity) / 2), MeshWidth (entity), MeshHeight (entity), MeshDepth (entity) End Function Function AutoRadius(entity) EntityRadius entity, MeshWidth (entity)+.2, MeshHeight (entity)+.2 If SHOW_ENTITY_COLLISION_AREAS x=CreateSphere(8,entity) FitMesh x, -(.2+MeshWidth (entity) / 2), -(.2+MeshHeight (entity) / 2), -(.2+MeshWidth (entity) / 2), .2+MeshWidth (entity), .2+MeshHeight (entity),.2+MeshWidth (entity) EntityAlpha x,.7 EntityColor x,0,255,0 EndIf End Function ; the .2 is just adding a little more. i'm confused - is the sphere shape like this? x,y,x or x,y,y? that is, if you set x and y to say, 10 and 5 will you get a sphere that is stretched to fix a box 10 long, 5 heigh, and how many wide? 5 or 10 or some other number? seems like we need a 3rd parameter. or docs clarification |
| ||
the x parameter is also used for z. |