diff --git a/Sofa/framework/Core/src/sofa/core/objectmodel/Context.cpp b/Sofa/framework/Core/src/sofa/core/objectmodel/Context.cpp index 1bc2b619271..108c09a24c7 100644 --- a/Sofa/framework/Core/src/sofa/core/objectmodel/Context.cpp +++ b/Sofa/framework/Core/src/sofa/core/objectmodel/Context.cpp @@ -136,7 +136,10 @@ void Context::copyContext(const Context& c) void Context::copySimulationContext(const Context& c) { - worldGravity_.setValue(c.getGravity()); ///< Gravity IN THE WORLD COORDINATE SYSTEM. + if (!worldGravity_.isSet()) + { + worldGravity_.setValue(c.getGravity()); ///< Gravity IN THE WORLD COORDINATE SYSTEM. + } setDt(c.getDt()); setTime(c.getTime()); setAnimate(c.getAnimate());