Commit bad087c0 authored by Fabien Grzeskowiak's avatar Fabien Grzeskowiak

add Time step setter to API

parent 462742a6
......@@ -75,6 +75,15 @@ extern "C"
return true;
}
API_FUNCTION bool SetSimulationTimeStep(float result_dt)
{
if (cs == nullptr)
return false;
cs->GetWorld()->SetDeltaTime(result_dt);
return true;
}
API_FUNCTION bool DoSimulationSteps(int nrSteps)
{
if (cs == nullptr)
......
......@@ -58,6 +58,11 @@ extern "C"{
/// <returns>true if the operation was successful; false otherwise, i.e. if the simulation has not been initialized (correctly) yet.</returns>
API_FUNCTION bool GetSimulationTimeStep(float& result_dt);
/// <summary>Sets the step size of the simulation, in seconds.</summary>
/// <param ref="result_dt">[out] Will set the step size of the simulation.</param>
/// <returns>true if the operation was successful; false otherwise, i.e. if the simulation has not been initialized (correctly) yet.</returns>
API_FUNCTION bool SetSimulationTimeStep(float result_dt);
/// <summary>Performs the given number of simulation steps.
/// To obtain the resulting status of the simulation, use the GetAgentPositions() function.</summary>
/// <param ref="nrSteps">The number of steps to perform.</param>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment