I have a player with an onhit method bound to trigger when on onhit events with other objects, and it works fine with any objects with setsimulatephysics == true. The one time it doesn’t work is when the object its colliding with is a not simulated, say a static mesh that should not move and I am trying to make this mesh trigger the hit event, anything helps.
things i have tried: (does not work)
StaticMeshComp->SetSimulatePhysics(true);
StaticMeshComp->SetMobility(EComponentMobility::Stationary);
(does nothing)
StaticMeshComp->SetSimulatePhysics(true);
StaticMeshComp->BodyInstance.CreateDOFLock()
StaticMeshComp->BodyInstance.bLockXTranslation = true;
StaticMeshComp->BodyInstance.bLockYTranslation = true;
StaticMeshComp->BodyInstance.bLockZTranslation = true;
StaticMeshComp->BodyInstance.bLockXRotation = true;
StaticMeshComp->BodyInstance.bLockYRotation = true;
StaticMeshComp->BodyInstance.bLockZRotation = true;
(setting a constraint component as well does nothing)
(also tried using overlap methods instead and nothing)
it seems that the object has to move, there was a case where i was able to make the object not move with constraints, but it still moved when things bumped into it which is not what i am looking for. surely there is some way to make a static object trigger the hit event on the player while keeping the mesh basically static?