How to use _simGetGravity in C++

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

How to use _simGetGravity in C++

Post by yanxj20 »


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.

Site Admin
Posts: 8446
Joined: 14 Dec 2012, 00:25

Re: How to use _simGetGravity in C++

Post by coppelia »


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


Post Reply