Hey.
I’ve been making a game and it has been going well so far but I can’t seem to find a good way to implement collision detection. I’m not sure if I should just use JBullet because I need to be able to track when something got hit and how hard the hit was and react to that in game logic (if too hard hit, bounce off, otherwise land). Also I’d probably need to detect collisions with obj models. Any suggestions would be appreciated.
I think you can use JBullet for this. If you need something special that can not be done with JBullet you can integrate it.
I tried adding JBullet but it’s a bit difficult because I dont want to do it wrong and have to fix it later and the API is kind of confusing. The hardest part is probably linking my GameObjects and JBullet’s CollisionObjects together. Im not sure if I should just make my own collision system because I dont need 100% accurate collision detection :persecutioncomplex:
Suggestions would still be awesome
Okay gonna give this a bumb now that I’m interested in working on the game again :persecutioncomplex:
I’m pretty sure I wanna go with JBullet because it has what I want but I have a few questions about using it.
How should I handle terrain?. It should vary in height and have buildings, roads, powerlines and all kinds of other things that can be interacted with.
If I have an arraylist containing all game entities, should I store the RigidBody as a field in each entity and use it to determine the location of it? What about rendering the entities?
I need to use MotionStates to handle collision response right? I need to be able to bounce an entity off collided entity and apply damage that depends on how hard the entity was hit.