Hello friends,
I am want to use ML Agents for a robot with HingeJoints, and whenever the function OnEpisodeBegin is execute, i want to initialize all my hingejoints angles, at the same angle like in starting the simulation.
When i am trying that in the function, it is not work and the angles from the previous episode stays for the next.
Someone know what should i do ?
This is the code in the OnEpisodeBegin.
for (int i = 0; i < Joints.Length; i++)
{
var tempSpring = Joints*.spring;*
tempSpring.targetPosition = 0;
Joints*.spring = tempSpring;*
}
Thanks