Hello!
I wanted to know if it would be possible to get the “limits” data from Blender Physics constraints into PhysicsConstraints.hx
, such as from a Hinge constraint (Angular limit in this case):
I am however able to get the list of limiting values only from a Generic Constraint:
The PhysicsConstraint.hx
has an Array
field for limits:
public function new(body1:String, body2:String, type:String, disableCollisions:Bool, breakingThreshold:Float, limits:Array<Float> = null) {
super();
if (nullvec) {
nullvec = false;
vec1 = new bullet.Bt.Vector3(0, 0, 0);
vec2 = new bullet.Bt.Vector3(0, 0, 0);
vec3 = new bullet.Bt.Vector3(0, 0, 0);
trans1 = new bullet.Bt.Transform();
trans2 = new bullet.Bt.Transform();
}
this.body1 = body1;
this.body2 = body2;
this.type = type;
this.disableCollisions = disableCollisions;
this.breakingThreshold = breakingThreshold;
this.limits = limits;
notifyOnInit(init);
}
However, the limits are set only for Generic Constraint. All other constraints(Hinge, Spring, Slider…) give a null
value. I would like to get the limits for all other constraints as well. Any idea of how to handle that?
Thanks in Advance.