I have some problems with setting the weapon-output in front of the weapon. First i try to do it with reparent the weapon-output to the weapon (and after that i want to set an offset to the front of the weapon). But if i use this.weaponOutput.reparent(this.weapon) the weapon-output disappears.
Can someone tell me why this happens? I create a sample project so you can see the problem.
I indeed forget the this in the sample project. Sorry for that.
How i can set the scale the same as the orginal, i think if i use a wrong scale i also get a wrong ofsett?
I have update the sample project with the offset code and in the sample project it works fine, but if i use the same in my game, i get for every enemy a diffrent wrong offset. I dont understand why because i clone the same entity so i expect the same result on every cloned enemy…
Scaling is always local and is affected by the parent/hierarchy scale.
You can easily fix the scale to stay same, taking into account the original scale of the bone node. Here is an older post with a resolution for this issue:
I update the sample project again. I added a couple more soldiers with different rotations. Now you can see what also happened in my game. Also the scaling is still incorrect.