Compare commits
5 Commits
ft-pre-pos
...
main
Author | SHA1 | Date | |
---|---|---|---|
6bef120e16 | |||
f0081255ed | |||
507fb88756 | |||
|
7148f14b0d | ||
7d383871b8 |
@ -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);
|
||||
}
|
||||
|
||||
|
||||
// -------------------------
|
||||
|
@ -6,6 +6,38 @@ set "UE_PATH=C:\Program Files\UE_5.5"
|
||||
set "PROJECT_PATH=%~dp0"
|
||||
set "UAT_PATH=%UE_PATH%\Engine\Build\BatchFiles\RunUAT.bat"
|
||||
|
||||
|
||||
:: Check if MuJoCo DLL exists in bin directory
|
||||
if not exist "%MUJOCO_BIN_PATH%\mujoco.dll" (
|
||||
echo Error: MuJoCo DLL not found at %MUJOCO_BIN_PATH%\mujoco.dll
|
||||
echo Please ensure the MuJoCo DLL is properly built and placed in the correct location.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Copy MuJoCo DLL to the plugin binaries directory if it doesn't exist there
|
||||
if not exist "%MUJOCO_DLL_PATH%\mujoco.dll" (
|
||||
echo Copying MuJoCo DLL to plugin binaries directory...
|
||||
copy "%MUJOCO_BIN_PATH%\mujoco.dll" "%MUJOCO_DLL_PATH%\"
|
||||
if errorlevel 1 (
|
||||
echo Failed to copy MuJoCo DLL
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
:: Add UE and MuJoCo paths to PATH environment variable
|
||||
set "PATH=%UE_PATH%\Engine\Binaries\Win64;%MUJOCO_DLL_PATH%;%MUJOCO_BIN_PATH%;%PATH%"
|
||||
|
||||
:: Set the DLL search path for the current process
|
||||
set "PATH=%PATH%;%MUJOCO_DLL_PATH%;%MUJOCO_BIN_PATH%"
|
||||
|
||||
:: Run the Unreal Editor
|
||||
:: echo Starting Unreal Editor...
|
||||
:: start "" "%UE_PATH%\Engine\Binaries\Win64\UnrealEditor.exe" "%PROJECT_PATH%LuckyWorldV2.uproject"
|
||||
|
||||
endlocal
|
||||
|
||||
:: Build and package command
|
||||
"%UAT_PATH%" ^
|
||||
-ScriptsForProject="%PROJECT_PATH%LuckyWorldV2.uproject" ^
|
||||
|
Loading…
x
Reference in New Issue
Block a user