- Home /
Transform position in animated model
Hello guys!
I have an issue with Unity when using an animated 3D model.
I have a characted holding a wrench, and I want to emit some particles from the tip of it. Because the model has been animated in 3Ds max, I asked my 3D graphist to add a bone on the tip of the wrench so I can use it as the starting point in Unity.
The problem is, even if the transform is displayed correctly in the Scene viewer when the model plays an animation, I'm unable to get the real position of the point.
Here are two screenshots:
As you may see, the transform position and rotation in the inspector are not affected by the animation's movements (I know it's relative so it should not), nor is affected the Debug.Log(transform.position) output in the console (see the output count), but the scene editor seems to follow the point well.
Do anybody have a solution for this problem?
Why don't you just emit the particles from the tip?
var paticalEffect : Transform;
var wrenchTip : Transform;
Instantiate (paticalEffect, wrenchTip.position, Quaternion.identity);
Something like that, drag the wrench bone into the wrechTip var and the particle effect into the particalEffect var.
Just read your question again, do you not want to emit it from the tip of the wrench but at the position the wrench tip is ? Like on the nut it's tightening of the place it hits?
You are unable to get the real position of the point because the parent of the wrench has the position.
The position of the wrench is relative to the parent.
Answer by MrFraggy · Apr 15, 2014 at 02:47 PM
Ok so there is the solution: the anchor point was not in the model's bones hierarchy. So I moved it inside the correct bone and now it works!
Still wondering why unity displayed the correct position...
Your answer
![](https://koobas.hobune.stream/wayback/20220613142748im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
In animations, is it possible to only add transform values instead of setting it? 2 Answers
the animation moves the model? 0 Answers
Play animation as the value changes from 0 to 1 with changing GameObject's position in unity 0 Answers
Getting imported animated object position 0 Answers
Walk/run animation moves main camera up and down (first person) 1 Answer