I would like to implement a physics engine to my game engine. JigLibX looks good, but i have some questions…
1. About my Project
I am working on a sports simulation game with a ball and some characters who are interacting with that ball. For this game I am developing a game engine.
I already have some Collisiondetection…
I can check the collision for a sphere with: sphere, axis aligned box, capsule (i saw you have capsules too… this is great!)
The Capsules can be linked to a bone of a character, so a collision with a animated model can be simulated.
I also have a Ball with physics.
It would be a huge effort to advance this, so i think it is easier and has better results if i use an existing physics engine.
2. Capsule Bone Link
I think it should be no problem, to attatch a capsule to a character: i just can assign the transform of the bone every update.
But: I calculated the movement of the Capsule on collision. for this i saved the transformation of the last update and the time since the last upate. i also could calculate a movement vector if the capsule is just rotating (i am able to create cool catapults).
I think, you did this in a similar way, but i am not sure…
3. Ball physics
My Ball can have a spin. So if it collides somewhere the spin is manipulated by the collision and the emergent angle is influenced by this spin. in addition there are calculations for magnus effects which forces the ball to fly a curve if it has a spin.
Is this also available in your physics engine?
Or can I derive from a sphere-physics-object to add this functionality?
4. Collision detection accuracy
For the collision detection between my Ball and other collision objects I did a trick: I created Spheres between the last position and the current position with a distance of the radius of the ball between. Then I tested each sphere with the Collidables around and if there was a collision detected I calculated the right position of the Ball after this collision (in the same frame).
I think my method is a bit ugly because it is slow…
But i wonder how you solved this… i need such a accurate detection because the ball can fly sometimes very fast. So if i wouldn't do this kind of detection, the ball could fly through a goalpost or something…
5. Kinds of Collision
Am i allowed to disable Physics-behavior of a collidable?
Can I use a collidable for events? i mean: can i test if something is intersecting with a special collidable but then instead of bouncing an event will be called?
Just to be sure: Can I use the Library for free? also if I sell my game and / or my engine?
7. Future of this Project
Is this project still in development? The last update is 3 Month ago, so I am not sue about this…