Fighting contact collision

Kind of a newb question but after reading through the source i'm still not completely sure of my course of action.



I'm making a fighter hybrid and focusing on the fighting right now. I figured it would be easiest to use JBullet for collisions between the fighters. I was at first considering using a total of 6 PhysicsNode (4 BoxCollisionShapes and 2 MeshCollisionShape) to make the character. One to cover the (meshCol){ upperbody, lower body}, (BoxCol){each hand and each foot}. I'm guessing i would-using OGREXML- use the bones to find where the boxes should cover, ie hand, food waist w/e.



I just wanted to make sure this was a logical way of proceeding or if i should instead add a PhysicsCharacterNode for platform contact(gravity) and use everything else only for collision, use only PhysicsCharacterNode and forget about the other 6 PhysicsNodes, or follow a more basic version of collision detection and forget about jBullet for this project.

---I'm aware of the current problem with PhysicsCharacterNode and the vertical Shaking.---



~using jME3

It wont work, either you use ogre bones or you use physics joints, both will not work.

Physics in games should be used when you want the physics feel, not for collision detection of everything all the time. As said in a previous post, in most games "real" physics is only used at certain times. For a boxing/fighting game it might be a valid solution to make everything physics-based, depends on what you want/need.

The shaking in PhysicsCharacterNode only happens when the mesh used as floor has few vertices, I just committed a change that uses a box instead of a mesh to avoid the shaking in the test.

its a bad idea to use the local translation of bones to translate physicsNodes?



hmm I've actually gone back and forth on using physics as i only need it for fighter/ground contact and fighter/fighter. I guess a physics feel would help out in certain animation spots but i think i'm still debating, not sureā€¦lol. Their would probably be 5 fighters on the field at one time, though only 2 would be fighting at a time. So maybe I can set it up in a way to use only two physics setups- whichever way i end up doing it- instead of 5



is it really justified to use so many physics bodies on a single model?



btw thnx normen for the help in the last thread

The physics object count should be no problem on modern computers and as said its your decision if you want to handle stuff with physics or by faking it most of the time.

Its like AI, most of the time a really good AI algorithm is not a fun opponent in a game because its too good or effective for the player. So a set of if-else might make a better game AI in that case, still its more predictable and feels more artificial/dumb.

I've been attempting to go over this for some time now they may be trivial questions but assistance would be appreciated



Using PhysicsCharacterNode currently no matter if I use a personal model or one from the repo the character drops through the floor until it is halfway. I figured it could be the CollisionShape but nothing I do seems to work



Is thier a way to allow the various PhysicsNodes to translate and rotate with the Bones during animation If it is a bad idea to translate the physicsNodes using the bones translation?



If I wanted to Move the whole Model and I used various PhysicsNodes would attaching the other PhysicsNodes to say the torso and only translating the torso's translate the world positions of the attached physicsNodes; or should I translate each physicsNode independently?

  1. I think its the CollisionShape, jbullet seems to have problems with other shapes than spehre, I am looking into that.
  2. You'd have to handle that via the joints and physicsnodes, see the WIP physics ragdoll controller in jme3
  3. Its better to move all since the joints will otherwise have to cope with very large forces suddenly
normen said:

1) I think its the CollisionShape, jbullet seems to have problems with other shapes than spehre, I am looking into that.
2) You'd have to handle that via the joints and physicsnodes, see the WIP physics ragdoll controller in jme3
3) Its better to move all since the joints will otherwise have to cope with very large forces suddenly

1) hmm...maybe? I have gotten a lot of weird effects but maybe if their was an easier way to create a
    collisionShape of All the Geoms in a Node at once it can help. Looking at TestFancyCar I see that the Geometry of
    the chassis is called is this the intended way to use the meshCollisionShape (tried both meshCollisionShape &
    boxCollisionShape)  :?
2) The ragdoll controller seems to be tied to the testClass I'll have a look at it

Thx for the quick replies
Bonechilla said:

1) hmm...maybe? I have gotten a lot of weird effects but maybe if their was an easier way to create a
    collisionShape of All the Geoms in a Node at once it can help. Looking at TestFancyCar I see that the Geometry of
    the chassis is called is this the intended way to use the meshCollisionShape (tried both meshCollisionShape &
     boxCollisionShape)  :?
2) The ragdoll controller seems to be tied to the testClass I'll have a look at it

Thx for the quick replies

1) MeshCollisionShape will not work for movable nodes anyway. Creation of collision shapes from a node tree or other thing (like in jbullet-jme) is not yet built in, it will be a helper class with static methods. The FancyCar has a BoxCollisionShape.
2) The ragdoll controller is tied to the test class for some hackish debug display, as said its WIP.