Dynamic Objects and Character Physics?

Blitz3D Forums/Blitz3D Programming/Dynamic Objects and Character Physics?

Gabriel(Posted 2007) [#1]
Not really sure where to put this since it's a general programming principles question, and not tied to any particular language or API, but here seemed as good as anywhere.

Let's suppose I have a character, not controlled by a human player, and he walks predetermined paths which are generated by the internal pathfinding system. Now the pathfinding system needfully does not consider dynamic objects when creating paths to stop dynamic objects getting into a position where they could block an important path. So since the character can walk right through these dynamic objects, I need to do something else to prevent it.

The dynamic objects in question are physics controlled, so they have collisions and responses set up already, but the actor - as I've said walks a predetermined path and therefore cannot have any kind of physics controller. I'm just wondering what the best way to handle getting the objects to move out of the way of the character might be.

I'm thinking that I could create a physics object for the actor and manually position and orient it, but this does not create responses ( no velocity ) so I still have to check for collisions and then apply impulses to the dynamic objects which are colliding to get them out of the way. This is decent, but falls apart when the character's animation makes him a very different shape ( eg: lying down ) and the collision shape is the shape of him in a default pose ( standing up. )

So I thought another approach might be to calculate a bounding box around the actor, even taking into account animation and then compare that bounding box with a bounding box for the dynamic object and apply impulses whenever the two bounding boxes collide.

Forgive the pun, but I'm wondering if there might be a better idea, something "outside the box" that might work better. It's going to be painfully obvious if I do this badly. but I don't want to give up dynamic physics-controlled objects unless I really, really have to because it opens up some interesting gameplay angles that I don't think have been explored before.


H&K(Posted 2007) [#2]
Make him a ghost
re System shock 2


puki(Posted 2007) [#3]
Yes.

You shouldn't have to check anything outside of the immediate player surroundings.

AI has to auto-cripple and simplify when the player is not there.

There is nothing to check - there is no obstacle.


Gabriel(Posted 2007) [#4]
Oooooo..kay.

So assuming that I don't want to make every single character in my game a ghost, and assuming that I'm not even sure if Puki is answering this thread or another one..

Any ideas?