# [Bullet] Collision objects don't respond when driven by AI

## Recommended Posts

Take a simple box-to-box collision, when the boxes come to contact, one of the boxes should be pushing the other one forward...

the object with id of 99 is the pushing object, the object with the id 7 is being pushed (Pallet1), but the pallet (pushed object) doesn't translate/rotate at all?

Why?

I have contact threshold of 1e18f

The world is running at a rate of deltaTime * 0.001

and running in a standalone thread.

When the AI comes in, the physics is locked.

The mass of the pushing object is about 1000kg

The pushed object is 1kg

the pallet has no AI whatsoever... when the world is resolved, I updated the world transformation at the LateUpdate call before Render

	A:99
B:7
A:99
B:7
A:99
B:7
Physics Affecting Pallet1 -25 3.2681e-009 18.9999
Physics Affecting Pallet1 -25 3.2681e-009 18.9999
Physics Affecting Pallet1 -25 3.2681e-009 18.9999
Physics Affecting Pallet1 -25 3.2681e-009 18.9999
Physics Affecting Pallet1 -25 3.2681e-009 18.9999
Physics Affecting Pallet1 -25 3.2681e-009 18.9999

Edited by lucky6969b

##### Share on other sites

What you describe does not make much sense to me - not much idea what's going on there, so I will refer to the problem in topic: if your AI actor is kitematic (I assume it is) then no collisions are resolved for that object with the world, as you're expected to handle this on your own. Plus AI should not really walk into obstacles, and for anything that may fall or hit them - you need to resolve these collisions and responses on your own.

##### Share on other sites

I am making the code a bit convoluted, first, yes, the physics thread is running and keeps calling btDynamicsWorld::Update() and sleeps for a while, this thread is locked when the AI is *moving* the object, not calculating the paths, in the same way, whenever the physics is resolving the dynamics world (calling btDynamicsWorld::Update), the AI *Mover* will cease working temporarily and this intervenes one after the other.  For example, when I raise the pallet a bit, the pallet does fall down, the physics isn't the problem. By looking at the forklift exmaple of bullet,  the object can be pushed whenever the physics applies an engine force to the vehicle. So now that I am not applying this force, but using the AI to trigger the vehicle.

Thanks

Jack

##### Share on other sites

Okay, I seem to pin down where the problem is, because I assume we need to update the transformations to the physics on every frame. Free-Flow objects don't do this.

Edited by lucky6969b

## Create an account

Register a new account