- Home /
OnTriggerEnter Does Not Recognize Collider That Is Moved By iTween
I have 2 GameObjects. A Trigger and a Box Collider.
The Trigger script:
function OnTriggerEnter(col : Collider) { print(col); }
The Box Collider script:
function Start () { iTween.MoveTo(gameObject, {"x":230, "time":10}); }
The Box Collider moves and penetrates the Trigger, but nothing is printed out.
Whereas if I move the Box Collider by using keyboard input (eg Input.GetAxis("Vertical")), it is printed out.
How to make a Trigger recognize a Collider that is moved by iTween?
iTween should just be moving the object and you would normally get the collision, something else must be happening.
Never$$anonymous$$d, I'll use Raycast ins$$anonymous$$d. Thanks
I've just occurred this problem, and I figured out that I hadn't added Rigidbody for the object which is moved by iTween. Hope this help :)