float[] EndEffectorOrientation = new float[3];
EndEffectorOrientation[0] = r;
EndEffectorOrientation[1] = p;
EndEffectorOrientation[2] = y;
FloatWA orientation3d = new FloatWA(3);
orientation3d.setArray(EndEffectorOrientation);
dynamotionServer.simxSetObjectOrientation(clientID, endeffectorhandler,dynamotionServer.sim_handle_parent,orientation3d,dynamotionServer.simx_opmode_oneshot_wait);
}