ogre
ogre copied to clipboard
OgreBullet needs some love
-
~~OgreBullet does not support btCompoundShape which is the only way to offset collision shapes and have multiple of them per RigidBody.~~
-
~~Additionally all the CollisionShape utility functions are hidden which makes it hard to create shapes as needed from shapes and entities.~~
-
Also the full two-side kinematic body is not implemented because Bullet's kinematic btRigidBody is one side and does not handle collisions. I tried to use btKinematicCharacterController but was unable to make it run properly at all, so I consider the solution in Godot which is implemented roughly of useful parts from btKinematicCharacterController (de-penetration and sweep tests) w/o strange magic mumbo-jumbo. I think the following should be done:
-
[x] Add btCompoundShape support to OgreBullet.cpp https://github.com/OGRECave/ogre/pull/3363
-
[x] make shape creation functions available as API. https://github.com/OGRECave/ogre/pull/3363
-
[x] a API function is needed which would allow btRigidBody/btCollisionObject created outside to have Ogre listener attached for Ogre to handle the motion. https://github.com/OGRECave/ogre/pull/3364
-
[ ] implement ~~Godot's move_and_slide()~~ (changed direction and implemented as btActionInterface to run by physics directly ~~(approx. till June, 9)~~ done via btPairCachingGhostObject
- [x] Build convex shape list from btCompoundShape hierarchy
- [x] implement de-penetration part
- July plan:
- Kinematic motion:
- [ ] Implement sweep motion tests to avoid too much de-penetration (even though performance is good but a bit more robustness and stability are welcome)
- [ ] Add floor and wall tests (most important for feature completeness and ease of use)
- Other physics:
- [ ] Implement simple triggers. The setup of btGhostObjects is quite hard for many people so having more simple template setup for most usecases would be useful.
- Kinematic motion:
as I did not need that functionality myself yet, I have no idea how a good API for this would look like. PRs with proposals are welcome.
I have that planned over weekend, so there will be PR.
Created one of 2 PRs.
All PRs created. Then I go back to implementing move_and_slide...
added "implement Godot's move_and_slide()" it would be easier for me to track.
achievement made btPairCachingGhostShape work and still sane. Muhahahahagh!!!111