object's collision state

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

object's collision state

Post by Sophia » 31 Oct 2019, 07:36

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: 422
Joined: 09 Sep 2013, 19:28

Re: object's collision state

Post by fferri » 31 Oct 2019, 08:53

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

Post by Sophia » 31 Oct 2019, 09:54

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

Post by Sophia » 01 Nov 2019, 01:37

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: 7441
Joined: 14 Dec 2012, 00:25

Re: object's collision state

Post by coppelia » 01 Nov 2019, 14:07

Hello,

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

Cheers

Post Reply