Multiple Gravity Vectors


I am currently working with the SeatedHumanFullWithNeck model and running some experiments with the gravity vector.

I am wondering if with each step over a period of time, i could apply a specific gravity vector. If possible, how would i go about this?

I have seen in a previous question (7yrs ago) this was not possible with a different model. But i am asking in-case this is now possible.

Any help would be much appreciated.


Hi @Derrik

Unfortunately it is not possible to make a time-varying gravity vector.
The variable is still a constant and you can only change it by reloading the model.

Best regards,
AnyBody Technology

Hi Bjorn,

Thank-you for your reply. Good to know

Hi @Derrik,
You may use "AnyForce" class to aply the gravity-like bodyforce to the Human with the reference to the AnyKinCoM measure class.
With attached anyscript sample( AnyKinCoM COM x AnyForce GRAVITYFORCE ) you can see the same result as normal gravity condition.
Thank you,

//////////////////////// SAMPLE START //////////////////////////////////////////////
#include "C:\Program Files\AnyBody Technology\AnyBody.7.3/AMMR/Application/libdef.any"
Main ={
#include "<ANYBODY_PATH_BODY>/HumanModel.any"
////////////////////////////////////// MODEL
AnyFolder Model ={
AnyFolder &Human = .HumanModel.BodyModel;
AnyFolder &MotionDrivers = .HumanModel.DefaultMannequinDrivers;
AnyFixedRefFrame GlobalRef ={AnyDrawRefFrame dr={};};
AnyReacForce HumanGroundReaction ={
AnyKinLinear Lin={
AnyRefFrame &Ref1 = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
AnyKinRotational Rot={
AnyRefFrame &Ref1 = Main.HumanModel.BodyModel.Trunk.SegmentsLumbar.PelvisSeg;
////////////////////////////////////// STUDY
AnyBodyStudy Study ={

///////// AnyKinCoM COM x AnyForce GRAVITYFORCE
AnyKinCoM COM={
  AnyFolder &Refmodel= Main.HumanModel.BodyModel;
  AnyKinMeasure &measureRef=.COM;
  AnyVar grav =9.81;
  AnyVar MASS =.COM.MassTotal;

AnyFolder &ModelRef= .Model; // '&' creates a local reference to existing folder
Gravity = -9.81*{0, 0 ,0}; // Gravity Vector

//////////////////////// SAMPLE END //////////////////////////////////////////////

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.