## object's collision state

Typically: "How do I... ", "How can I... " questions
Sophia
Posts: 12
Joined: 31 Oct 2019, 06:33

### object's collision state

i need to get the object's collision state,i can use sim.checkCollision in lua now,but the function can't be used in legacy remote API. so how can i get the collision state in C client?

fferri
Posts: 407
Joined: 09 Sep 2013, 19:28

### Re: object's collision state

Use simxCallScriptFunction to call a Lua function that uses sim.checkCollision?

Sophia
Posts: 12
Joined: 31 Oct 2019, 06:33

### Re: object's collision state

how can i use the function?
in the lua:
lc=sim.getObjectHandle('lc')
lres=sim.checkCollision(lc,sim.handle_all)
so how can i use simxCallScriptFunction() to achieve the two words above in c?
could you tell me the answer?i just start to study it.thanks for your help.

Sophia
Posts: 12
Joined: 31 Oct 2019, 06:33

### Re: object's collision state

fferri wrote:
31 Oct 2019, 08:53
Use simxCallScriptFunction to call a Lua function that uses sim.checkCollision?
how can i use the function?
in the lua:
lc=sim.getObjectHandle('lc')
lres=sim.checkCollision(lc,sim.handle_all)
so how can i use simxCallScriptFunction() to achieve the two words above in c?
could you tell me the answer?i just start to study it.thanks for your help.
Top

coppelia
Site Admin
Posts: 7396
Joined: 14 Dec 2012, 00:25

### Re: object's collision state

Hello,

via the legacy remote API you can use simxReadCollision for instance.

Cheers