Quantcast
Channel: Answers for "How to make OnTriggerEnter2D work?"
Viewing all articles
Browse latest Browse all 18

Answer by Turzoxpress

$
0
0
**Solved!!!** I faced the same problem but solved it by myself with a simple trick! Follow the steps : 1. Keep your object\image in moving continuously to use "OnTriggerEnter2D" function perfectly ! Suppose your object\image is remain still in a certain position. now get the X(horizontal) value of your image\object from "Start" function like below : 2. Now create a function to increase this X(horizontal) value continuously like below : 3. Now call the fucntion from the "Update () " function : var temp : float = 0; function Start () { temp = Image1.position.x; } function KeepMoving() { Image1.position.x = temp + 0.00001; // increase the x value slightly! Image1.position.x = temp; // again move the fast position } function Update () { keepMoving(); }

Viewing all articles
Browse latest Browse all 18

Latest Images

Trending Articles





Latest Images