Hello, everyone.
So, i instantiate an object using a code below. Right after it spawns it just stay still for ~0.3 seconds and only after that it starts moving. If i change interpolate of that object from “none” to “interpolate”, the object jumps further and back a few times in the direction it should go after instantiating and then move normally.
void Fire()
{
Rigidbody2D FireballInstance = Instantiate(Fireball, transform.position, transform.rotation) as Rigidbody2D;
FireballInstance.AddForce(transform.right);
}
The Fire() is called from Update function, because Update checks if mouse is pressed more correctly than FixedUpdate. Tried to make it from FixedUpdate though and nothing changes, object freezes for a moment and then start moving.
I also tried to move:
FireballInstance.AddForce(transform.right);
Into that object code in Awake. But result was the same.
What am i doing wrong? (And sorry for bad English, if anywhere).