[Question] How Override Behavior of Meshes Simulating Physics Getting Repelled by Collision with Characters?

Dear Friends at Epic,

I want to override the behavior of Static Mesh Actors that are simulating physics being repelled by collisions with Character default capsule component

#Goal

My goal is to enable Character to stand steady on a large Static Mesh Actor that is simulating physics.

#Overriding CanBeBase

I am already over-riding

virtual bool CanBeBaseForCharacter(class APawn* APawn) const OVERRIDE;

but that is not enough,

I need to stop the Character collisions from shooting the mesh all over the place :slight_smile:

#Overriding PrimitiveComponent = not an option

I dont know how to override the primitive component functions directly since I am using a class that extends Static Mesh Actor and I cant tell Static Mesh Actor to suddenly use a different component class.

I also dont know where this behavior is coming from

#Actor.h functions Overridden

I tried over riding a bunch of actor.h functions, but none of them stopped the behavior.

virtual void ReceiveActorBeginOverlap(class AActor* OtherActor) OVERRIDE;

virtual void ReceiveHit(class UPrimitiveComponent* MyComp, class AActor* Other, class UPrimitiveComponent* OtherComp, bool bSelfMoved, FVector HitLocation, FVector HitNormal, FVector NormalImpulse, const FHitResult& Hit) OVERRIDE;

#Not Virtual

This function looked promising in Actor.h, but it is not virtual

virtual void DispatchPhysicsCollisionHit(const struct FRigidBodyCollisionInfo& MyInfo, const struct FRigidBodyCollisionInfo& OtherInfo, const FCollisionImpactData& RigidCollisionData) OVERRIDE;

#Please do let me know

Please do let me know what function(s) causes Static Mesh Actors in physics mode to get push away by collisions with characters, so I can modify this behavior :slight_smile:

Thanks!

Rama

#My Character Mesh has RB Colilsion

Please note my Character’s Mesh also has physics collision set, so im not sure if it is the capsule or the Character’s mesh

but there are so many functions that could be involved

Please do let me know what exactly is causing the RB static mesh component to be repelled from the player’s capsule/mesh

so I can override this behavior

so that the character can stand steady on top of the RB mesh

:slight_smile:

Thanks!

Rama

PS: RB = Rigid Body

Skylar Breen, fellow Rocket User, gave me the answer!

To disable physics on capsule you need
to set bEnablePhysicsInteraction in
your movementcomponent to false. If
you still push rigid bodies when its
disabled, then your physics asset is
colliding and pushing the actor. To
test try disabling collision on it and
see if it fixes it.

Rama