Typically: "How do I... ", "How can I... " questions
-
xelda1988
- Posts: 13
- Joined: 02 Jul 2013, 17:13
Post
by xelda1988 » 13 Aug 2013, 13:09
Hi
In a childscript I import an object from a .stl file.
I want to make this object respondable in the simulation by using the function
simSetObjectSpecialProperty(handle,sim_objectspecialproperty_respondable)
But it seems the system doesn't know the API constant
sim_objectspecialproperty_respondable:
My Code:
Code: Select all
shapeHandle=simImportShape(4,"/home/alexander/faceplate.stl",0,0,0.001)
handle=simGetObjectHandle('Shape')
simSetObjectPosition(handle,-1,{0,0,1})
result=simSetObjectSpecialProperty(handle,sim_objectspecialproperty_respondable) -- here the script stops with : One of the function's argument type is not correct. (simSetObjectSpecialProperty)
print(type(sim_objectspecialproperty_collidable)) -- says Nil
-
coppelia
- Site Admin
- Posts: 7441
- Joined: 14 Dec 2012, 00:25
Post
by coppelia » 13 Aug 2013, 13:56
Hello,
there is a mistake in the documentation, thanks for pointing that out!
If you want to make your shape respondable, use following function:
simSetObjectIntParameter(objectHandle,3004,1)
If you call above function during simulation, you might have to call
simResetDynamicObject(objectHandle) too.
Cheers
-
xelda1988
- Posts: 13
- Joined: 02 Jul 2013, 17:13
Post
by xelda1988 » 13 Aug 2013, 14:31
Thanks
the object is now dynamically enabled, but still does not fall down - how can I change this?
*Edit: I solved it with setting simSetObjectIntParameter(handle,3003,0)