Collision actor with rigid body displaces Pawn

I’m making an actor that the player can throw (a stone).

It extends from actor and has a staticmeshcomponent. When throwing it, changes the physics to PHYS_RigidBody and everything works fine.

When colliding with a Pawn, a Bump and a RanInto events occurs. The problem is that the collision displaces the Pawn, it makes a small jump.

How can I prevent this jump from occurring? In both events I do in the throwable:

velocity = vect(0,0,0);
Mesh.SetRBLinearVelocity(vect(0,0,0), false);

to stop the throwable actor, but that doesn’t stop the pawn from jumping. Nor if I destroy the throwable in the event. It appears that Pawn’s jump occurs before those events.

1 Like

I haven’t played with this type of thing too much, but I usually stopped unwanted physics interactions by making sure I overrode all physics events, including Touch(), and putting in a “return;” line whenever I wanted all physics effects to stop.

1 Like

Finally I found a solution, the collision with pawns is done in the RanInto event and with statics in the RigidBodyCollision event.

These are the properties in DefaultProperties:

bCollideActors=true
bBlockActors=true
bWorldGeometry=false
bCollideWorld=true
bUpdateSimulatedPosition=true
bPushedByEncroachers=false

And these are the ones assigned when throwing the stone:

    Mesh.setNotifyRigidBodyCollision(true);
Mesh.ScriptRigidBodyCollisionThreshold=5.0;
Mesh.SetRBChannel(RBCC_Pawn);

Here is a test:

1 Like

It’s perfect. :clap::clap::clap:
Thank you for good information.

1 Like