## How to use _simGetGravity in C++

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

### How to use _simGetGravity in C++

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

### Re: How to use _simGetGravity in C++

Hello,

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

Cheers