Unity 트리거와 콜리젼의 다른점 Differences between Trigger and Collision

When the trigger box is on, it will trigger (Which an object will pass through)

void OnTriggerEnter2D (Collider2D trigger) {

print (“This is the trigger”);

}

When the trigger box is not on, it become a collision (Which an object will stop)

void OnCollisionEnter2D (Collision2D collision) {

print(“This is the Collision”);

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s