1 decade ago by Joncom
It seems that a good way to stop an entity from sliding down a slope is to disable gravity when his feet are on the ground (according to this thread).
So how does one change gravity for an entity on-the-fly?
There&
However, when I try the executing the command:
...there is no change to gravity on the player.
And if I try the simple command:
...this results in all entities and the map disappearing entirely without an error.
Please help.
So how does one change gravity for an entity on-the-fly?
There&
039;s a <4> function which takes an argument called #massData
possibly of the format: {mass: 0, center: {0,0}, I: 1}
.However, when I try the executing the command:
ig.game.player.body.SetMass({mass: 10000, center: {x: 0, y: 0}, I: 3});
...there is no change to gravity on the player.
And if I try the simple command:
ig.game.player.body.SetMass(10);
...this results in all entities and the map disappearing entirely without an error.
Please help.