- Home /
iTween not working within OnCollisionEnter?
I am attempting to set up an animation where a ball is dropped from it's launcher (gravity), and then when it makes contact with the stage, is set to Kinematic. This much works. However, the second part of the animation has the ball moving to it's launch point via a tween.
This... is not working. isKinematic is set to true, and useGravity is false. The ball stops moving when it hits the ground, and this -should- take over:
private void OnCollisionEnter(Collision collision)
{
if (ballSetup)
{
if (collision.transform.tag == "Stage")
{
if (!tweenToStart)
{
ballRB.isKinematic = true;
ballRB.useGravity = false;
iTween.MoveUpdate(gameObject, iTween.Hash("position", launchPos, "time", 3));
Debug.Log("Should be tweening.");
tweenToStart = true;
}
}
}
}
However... the tween appears on the object, and then nothing happens. It remains seated where it is. I've tried both MoveTo and now MoveUpdate, both of them are producing the same result. The odd thing is, to me this seems like a normal scenario using iTween - which I've gotten working a dozen times before. What issue here might be stopping the tween from running this time?
Your answer
Follow this Question
Related Questions
iTween Path Rotation Problem - Please Help I am Stuck 1 Answer
How can I use iTween to tween the color of a SpriteRenderer? 1 Answer
Path Controlled Character and Working With Physics on iTween 1 Answer
How do I get the 2.5d platformer's rigidbody physics to follow a path? 2 Answers
2D 360 degress platformer example needed 0 Answers