Compare commits
2 Commits
7d383871b8
...
507fb88756
Author | SHA1 | Date | |
---|---|---|---|
507fb88756 | |||
|
7148f14b0d |
@ -109,13 +109,6 @@ template <typename ComponentType> void AMujocoVolumeActor::AssignComponentsToArr
|
||||
}
|
||||
}
|
||||
|
||||
template <typename UserClass>
|
||||
void AMujocoVolumeActor::BindPostPhysicDelegate(UserClass* Object, void(UserClass::* Func)(float))
|
||||
{
|
||||
PostPhysicUpdateDelegate.BindUObject(Object, Func);
|
||||
}
|
||||
|
||||
|
||||
void AMujocoVolumeActor::InitializeMujoco()
|
||||
{
|
||||
InitializeMujocoScene_WithContactExclusion(TMap<FString, FString>{});
|
||||
@ -417,7 +410,7 @@ void AMujocoVolumeActor::Tick(float DeltaTime)
|
||||
for (int32 SimStep = 0; SimStep < SimStepsPerGameFrame; ++SimStep)
|
||||
{
|
||||
mj_step(MujocoModel.Get(), MujocoData.Get());
|
||||
PostPhysicUpdateDelegate.ExecuteIfBound(MujocoData->time);
|
||||
PostPhysicStepDelegate.ExecuteIfBound(MujocoData->time);
|
||||
}
|
||||
|
||||
for (int32 i = 1; i < BodyComponents.Num(); ++i)
|
||||
|
@ -114,7 +114,7 @@ public:
|
||||
// ------- POST UPDATE -------
|
||||
// ---------------------------
|
||||
private:
|
||||
FPostPhysicUpdate PostPhysicUpdateDelegate;
|
||||
FPostPhysicUpdate PostPhysicStepDelegate;
|
||||
public:
|
||||
/**
|
||||
* Register a delegate to be executed after mj_step, useful to fine control actuators
|
||||
@ -122,7 +122,10 @@ public:
|
||||
* @param Func - The Function to call - takes a float as parameter which is the current simulation timestamp
|
||||
*/
|
||||
template<typename UserClass>
|
||||
void BindPostPhysicDelegate(UserClass* Object, void (UserClass::*Func)(float));
|
||||
void BindPostPhysicStepDelegate(UserClass* Object, void (UserClass::*Func)(float))
|
||||
{
|
||||
PostPhysicStepDelegate.BindUObject(Object, Func);
|
||||
}
|
||||
|
||||
|
||||
// -------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user