I'm trying to set an initial for a body in a dynamics simulation.
The instructions from here work:
viewtopic.php?t=6028
However, when I try to do the same through the matlab API, the initial velocity isn't set.
The scene is just a dynamically enabled sphere in the air.
The matlab code is as follow:
Code: Select all
vrep=remApi('remoteApi');
vrep.simxFinish(-1);
clientID=vrep.simxStart('127.0.0.1',19997,true,true,5000,5);
[returnCode,handle] = vrep.simxGetObjectHandle(clientID, 'Sphere', vrep.simx_opmode_blocking);
returnCode = vrep.simxSetObjectFloatParameter(clientID,handle,vrep.sim_shapefloatparam_init_velocity_x,1.0,vrep.simx_opmode_blocking);
returnCode = vrep.simxStartSimulation(clientID,vrep.simx_opmode_blocking);
Thanks in advance.