How to use _simGetGravity in C++

Typically: "How do I... ", "How can I... " questions
Post Reply
yanxj20
Posts: 11
Joined: 14 Jan 2021, 08:11

How to use _simGetGravity in C++

Post by yanxj20 »

Hi,

I want to get Gravity vector of one link of a manipulator in C++. I find function _simGetGravity on the additional API functions list. When I try to use it, I find it isn't in extApi.c or extApiPlatform.c. How can I use it? Thanks.

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

Re: How to use _simGetGravity in C++

Post by coppelia »

Hello,

if you need the gravity vector that acts on the scene, use: sim.getArrayParameter(sim.arrayparam_gravity)

Cheers

Post Reply