Is Transform.Translate affected by GameObject's scale?
I've made an enemy logic to pursuit the player and it uses Transform.Translate to move it. It seems to work fine, but when I duplicated the enemy and only increased it's scale, it's getting a LOT faster than the other. If I decrease the scale, it gets slower.
So I ask: is Transform.Translate() being affected by scale? How can I resolve it? Maybe dividing speed by object's scale value?
EDIT: as I was testing, when I disabled the Animator, the results were the opposite: the bigger the slower.
So the problem was in the Animator logic. Well, then I'm a bit confused. I'm using the Package 3d Game Kit from asset store. So does the Animator works on moving the object? I didn't know that's even possible.
Answer by iuridosanjos · May 25, 2020 at 04:50 AM
Well, I've found the problem. Yes, the Animator (Animation) can change the object's position. I had to uncheck the "Apply Root Motion" on the Animator so it doesn't happen (the animations will take place without moving the object).
Your answer
Follow this Question
Related Questions
Player doesn't face in direction of its last movement direction 0 Answers
Can someone help me rewriting my script from transform.position to transform.Translate? 1 Answer
move a player at specific distance to road lanes 0 Answers
Help please, movement and animator issue 0 Answers
Movement and Jump with animator 0 Answers