And you have to manually check for collisions, because the CharacterControl emulates physics in a simple way and the developer didnt find it handy to add the functionality internally. But seriously: Its not that hard and once done you are ready, where’s the problem?
I have to agree with Vortex this seems like something that absolutely everyone is going to have to implement for any game using this engine? it would be nice to have a good concrete example that shows at least two character type physics objects actually colliding and rebounding of one another
The reason I am suggesting this is because there seems to be a few examples sprinked throughout the jme3test examples that use ghost objects and others that use overriding the simpleUpdate from Application to find and sort through collision results but all the examples Ive mentioned that Ive found dont prevent meshes from intersecting only report when they do
Once we detect a collision what are we meant to do to prevent the meshes from intersecting further?
i haven’t used any physics at all, and skipped all physics tutorials. But based on common sense the engine should provide the .normal of the vertex they collided, use that to apply a force on the characters.
i see that the main character(player) is colliding with the scene only if a force is aplied to it) and that's all
so my other caractercontrols(enemies) don't collide with anything
and if i check the doc, i don't see how to get that normal to base my expulse forces on
getAppliedImpulse() A float value representing the collision impulse
getAppliedImpulseLateral1() A float value representing the lateral collision impulse
getAppliedImpulseLateral2() A float value representing the lateral collision impulse
getCombinedFriction() A float value representing the collision friction
getCombinedRestitution() A float value representing the collision restitution (bounciness)
nothing seems to return any collision point/face_normal
jesus why is there no simple example for such a simple case
i find it hard to believe someone has made an fps with jme3 without rewriting a whole physcal control
any hint ? I am lost and confused
I have reverted to using a simple RigidBodyControl with a BoxCollisionShape for now that detects collisions by itself and seems to work ok for the most part
Thanks everyone and im glad other people are having the same issues maybe someone will build a tutorial soon to address this
or finish coding the character controller class heh either way
I tried modifying BombControl class briefly to detect char on char collisions but it wasent working quite like id hoped and in the end the simple solution worked well enough
they got to be calculated regarding the distance between objects, point of intersection, normals ....
it should be made out of constraints like with NewtonPhysicEngine but i don't know how to do this with JME/bullet and i am not mathematician, integration is not an easy concept
so here is a global reaction force calculation,
it is crappy but you get the idead
the advantage is that it is quiet fast.
here, other entities are moving away from the main player
any advice would be really welcomed, especialy from the brains of Jme project who understand this better than any regular (non mathematician) programmer
althought i must say jme is by far the most advanced, top level 3D game framework i have been using
@normen said:
Cause they don't ^^ You'd have to check for that otherwise. Search the forum, theres been several solutions for this.
can you tell me how to get the Vector3f intersection point at collision time ?
by using simple 3dof hard joints at each impact point, meshes will never overlap