jPCT - a 3d engine for Java > Projects

GW: Bloddy Camp

<< < (2/2)

EgonOlsen:
Sorry, I forgot about this question...it happens most likel, because your ellipsoid climbs up the polygon mesh of the collision target. You can try to work against it by setting the y-coordinate of the corrected translation to 0. But that usually leads to entities moving into each other. A better solution is to use a collision mesh like a cylinder instead of the actual polygon mesh. To do this, at such a collision mesh as a child to the actual mesh but make it in visible expect during the collision detection phase.

Gatobot14:
instead of polygon mesh i already attached a ellipsoid from primitives class made of 16 polygons, the collision happens between the player ellipsoid and the enemy ellipsoid, also the ellipsoid its use for the collision avoidance.
I understand you that player can climb the enemy beacuse of the shape of the ellipsoid and the enemy ellipsoid its a bit smaller,
so using a cillinder will resolve most of the issue player vs enemy, and using a ellipsoid for collision avoidance,
could these be good??

im using a ellipsoid primitive because i think i will be good using with "checkCollisionEllipsoid"

EgonOlsen:
Yes, using a cyclinder instead sounds like a good idea. Either that or a box. It depends on the actual shape for your collision targets.

Gatobot14:
ok just one last question(for educational purpose):  the shape used for collision does not have to match the methods in the api??
for example: you suggest using a cillinder, there should be a checkCollisionCillinder????
just wondering  ::)

i will try to fix my collision according to your advice
many thanks

EgonOlsen:

--- Quote from: Gatobot14 on September 09, 2015, 08:11:13 pm ---ok just one last question(for educational purpose):  the shape used for collision does not have to match the methods in the api??
for example: you suggest using a cillinder, there should be a checkCollisionCillinder????
just wondering  ::)

--- End quote ---
No. The name of the method refers to the primitive used to approximate the collision source. The collision always happens primitive (like ray, sphere, ellipsoid) against mesh, which can be anything.

Navigation

[0] Message Index

[*] Previous page

Go to full version