diff --git a/Source/URLab/Private/MuJoCo/Core/MjArticulation.cpp b/Source/URLab/Private/MuJoCo/Core/MjArticulation.cpp index 2a0865f..d296198 100644 --- a/Source/URLab/Private/MuJoCo/Core/MjArticulation.cpp +++ b/Source/URLab/Private/MuJoCo/Core/MjArticulation.cpp @@ -246,9 +246,8 @@ void AMjArticulation::Setup(mjSpec* Spec, mjVFS* VFS) m_ChildSpec = mj_makeSpec(); m_ChildSpec->compiler.degree = false; - // Apply this articulation's simulation options to the child spec. - // mjs_attach will merge these into the root spec at compile time. - SimOptions.ApplyToSpec(m_ChildSpec); + // SimOptions get folded into the parent spec by FMuJoCoOptions::Resolve; + // writing to m_ChildSpec here would be discarded by mjs_attach. m_prefix = GetName() + TEXT("_"); diff --git a/Source/URLab/Private/MuJoCo/Core/MjPhysicsEngine.cpp b/Source/URLab/Private/MuJoCo/Core/MjPhysicsEngine.cpp index a639ed6..6f18369 100644 --- a/Source/URLab/Private/MuJoCo/Core/MjPhysicsEngine.cpp +++ b/Source/URLab/Private/MuJoCo/Core/MjPhysicsEngine.cpp @@ -172,6 +172,27 @@ void UMjPhysicsEngine::PreCompile() m_heightfieldActors.Add(HFA); } } + + // mjs_attach above drops each articulation's