jPCT-AE - a 3d engine for Android > Support

Collision detection only working occasionally

(1/1)

Irony:
That's strange.. when I fly my jet into a space station (about 5x the size), often fly right trough it. When I turn around and try it again one, two or three times, the ship crashes okay. Same thing happens when colliding with other objects (all bigger than the jet)

Code snippet that is called every frame:


--- Code: ---if (model.checkForCollision(xAxis, (float) (speed*ticks)/100) != Object3D.NO_OBJECT) {
   kill();
}

--- End code ---

(xAxis points forward)

Already checked:

* latest Engine version
* Collision_check_self is set on jet model
* Collision_check_others is set on space station model
* Objects are all built
* Tried to play around with the "step" parameter making it longer/shorter
Still, only collides 1 out of 3 times.


EgonOlsen:
Try to increase this value: http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#collideOffset

Irony:
Works!

Navigation

[0] Message Index

Go to full version