Well I ported PhysicsCharacterNode a while ago (April 1st) to JBullet from Bullet’s and it looks like there hasn’t been to many major updates to it. You’re welcome to download that JBullet branch from normen’s google code repo and mess with the jump function, maybe even backport it for the Bullet guys.
Well it seems my 1st post is gone…
I was thinking hard on this subject.
I see PhysicsCharacterNode as a simple way to have a player moving and looking around in a well controlled way.
But I miss several things:
- we dont seem to be able to reset player forces, so if it is falling fast and you reposition it, it will continue falling very fast
- the jumps happen always when fall speed is zero, even if at top of jump (thread subject)
- the gravity uses a integer system different from physics world gravity
- movement forces must be directly controlled by updating vector3f positions
and a few other things I think… too much trouble
So I am thinking on some alternatives.
- may be, attach a PhysicsNode to the PhysicsCharacterNode and let jumps be applied to the PhysicsNode and reposition PhysicsCharacterNode to it;
Also, apply move forces to that PhysicsNode (player commanded movement, or a explosion near it).
- harder but I like this: create a simplified PhysicsNode jointed body and let forces work on it, also affecting camera position/rotation/etc if you fall to the floor. It may not play fun tho, but I must see b4 judging :).
- in both cases up: Attach a BoundingBox (or something else…) to its feet to help dethermine if/how it can jump based on what ground it is touching.
Those implementations would be too much attached to JME3 I think, so I dont believe it can be contributed back to jbullet
I will work on it as soon I finish my other priorities.
Anyone has had some good experience on such kinds of approach to this subject, that would like to share? thx! xD