setAxisMotorTarget not work

Hello,
“setAxisMotorType” method work in playground but not work in local project and show this error :

TypeError: constraint._pluginData is not iterable
at HavokPlugin.setAxisMotorType

Can you provide a bit more information about your project? constraint._pluginData is an array, so it should be iterable. A reproduction will be great.

Uncomment line 93-96 to show error:

I believe you just need to put this line

aggA.body.addConstraint(aggB.body, constraint);

before constraint.setAxisMotorType

Example - https://playground.babylonjs.com/#4O4PMI#2

2 Likes

Solved :slightly_smiling_face:. thank you.

1 Like