Set qfrc/xfrc in Unity

Discussion in 'Unity Plugin' started by ksjoey0096, Sep 18, 2018.

  1. Hello,

    There are some questions I want to ask.

    1. Since there are only the function names in Unity Plugin, can I know what SetPerturb(TPerturb* perturb) actually do in Unity?
    2. How can I directly control the mjdata, or how can I add functions like qfrc_applied / xfrc_applied to Unity Plugin?

  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    You cannot control the simulation except via mouse perturbations. This limitation will be removed with the next update of the Unity plugin -- sometime in December or January.

    SetPerturb sets a mujoco-specific data structure with information about mouse selection and perturbations. It can only apply force and torque to a single body at a time, and cannot be used as a general control mechanism.