help CollisionTriangle
Blitz3D Forums/Blitz3D Programming/help CollisionTriangle
| ||
Graphics3D 800,600,32,2 SetBuffer BackBuffer() Local Camara% = CreateCamera() Local Luz% = CreateLight() Local Caja% = CreateCube() Local Bola% = CreateSphere(8) PositionEntity Bola%,-5,0,0 PositionEntity Camara%,0,0,-10 EntityType Bola%,1 EntityType Caja%,2 EntityRadius Bola%,1,1 While Not KeyDown(1) Collisions 1,2,3,2 UpdateWorld RenderWorld For X = 1 To CountCollisions(Bola%) P=CollisionTriangle(Bola%,X) Next Text 0,0, P Flip If KeyDown(205) MoveEntity Bola%,.2,0,0 If KeyDown(203) MoveEntity Bola%,-.2,0,0 If KeyDown(200) MoveEntity Bola%,0,0,.1 If KeyDown(208) MoveEntity Bola%,0,0,-.1 Wend Hello, I'm doing something wrong, I command returns the number of the triangle that has suffered a collision, instead I return the number: 65535 any suggestions Edit: God, I feel stupid, I solved the problem by changing the method of collision, of Sphere polygon and not wait to box ... Blitz3D sometimes definitely makes me shit balls ... -.- Last edited 2012 |