Bullet for player AI feasible?
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
Bullet for player AI feasible?
So far I use a separation: Bullet for physics and own collision detection for AI routines. The question now is if it is feasible and in general a good idea to use Bullet also for AI routines? For example a player moving through a world represented by for example a sphere ( or some other geometric volume ). Is Bullet fast enough to handle this? What about custom collision responses ( hence if a collision happens the intended behavior is not always sliding around but maybe stopping or changing course ), does Bullet cope with changing parameters during collisions?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Bullet for player AI feasible?
Yes, Bullet should be able to handle many queries. Improvements/development is mainly driven by feedback of users, so if it is too slow for you, please provide a reproduction/test case and we can make it faster.Is Bullet fast enough to handle this?
Yes, you can use only the collision detection query for characters/AI and take care of the motion yourself.What about custom collision responses ( hence if a collision happens the intended behavior is not always sliding around but maybe stopping or changing course ), does Bullet cope with changing parameters during collisions?
It is busy time, preparation for the game developers conference, but the plan is to add a character control demo, perhaps with some AI characters wandering around.
Thanks,
Erwin
-
- Posts: 198
- Joined: Mon Sep 04, 2006 5:31 pm
- Location: Switzerland
Re: Bullet for player AI feasible?
I meant more during the physics simulation. So for example you have a player represented as a sphere and a crate represented as a box. Now the crate is under physics influence. Now if the player moves into the crate various things could happen ( depending on let's say if the crate is easy to move or heavy like hell ). He could push the crate aside without stopping movement ( Max Payne style ) or he could get slowed down ( Lara croft box pushing ) or he could get bumped backwards ( who put that heavy rock in that crate?! ).
So the idea is to have a physics simulation run and the player sphere is driven using kinematics and the crate box using dynamics. If they collide I determine somehow a collision response. This response would be now inside the simulation loop. This is what ( in my opinion ) could cause troubles but I don't know how Bullet is going to react to such a constellation.
So the idea is to have a physics simulation run and the player sphere is driven using kinematics and the crate box using dynamics. If they collide I determine somehow a collision response. This response would be now inside the simulation loop. This is what ( in my opinion ) could cause troubles but I don't know how Bullet is going to react to such a constellation.