Home Website Youtube GitHub

Gravity to springnode

hi,

i am trying to expand the c++ spring-node, so it can have also gravity. at the moment the mass should be 1.
i have created a gravity vector (like the goal with createPoint) and now i am not sure where to add this vector to the velocity/accelaration…

at the moment i am adding the gravity vector to the “velocity”…but i am not sure, because in my node tests, the spring chain then always hangs down, and i loose the spring behaviour…
when adding it to the the “goalForce” vector, then the spring chain goes mad (strange flipping behaviour…)

maybe one of the developers has a hint, where in the spring-node code a gravity vector can be implemented…
(or does the spring-node needs a completely other spring implementation to have gravity?)

greets