Passive/non-Dynamic rigid body via Haxe?


#1

Hello,
I’m trying to generate procedural terrain, and part of that involves setting the mesh rigid body to passive/non-Dynamic via Haxe. I have tried rb.body.activate(false) as well as rb.setActivationState() to multiple values without results.
Is this possible to do currently via Haxe?
Here’s how I’m implementing my rigid body currently If it helps:

var rb = new armory.trait.physics.RigidBody();
object.addTrait(rb);
// Set as passive/non-Dynamic

Thanks


#2

Just set the mass to 0 as the first parameter of the RigidBody trait’s constructor:

var rb = new armory.trait.physics.RigidBody(0);

That will make the object passive.