I have to Add Force to my physics object every time before it updates. Is there such delegate i can subscribe to?
//Will be only called on a NEXT physics Step (including substeps). Use tick to call it on every step.
UFUNCTION(BlueprintCallable)
void SubscribeToNextPhysicsSubstep(UPrimitiveComponent* Component)
{
if (!Component)
return;
FCalculateCustomPhysics OnPhysicsSubstep;
OnPhysicsSubstep.BindUObject(this, &YourClass::FuncName); //Function has to be "void FuncName(float, FBodyInstance*)"
Component->GetBodyInstance()->AddCustomPhysics(OnPhysicsSubstep);
}
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.