How to prevent a 2D Kinematic asset passing through a 2D Box Collider.
I am creating a game inspired by Agar.io, and I'm having trouble stopping the player movement from exiting the game space.
This is a general idea of how the game looks right now, but I cannot solve for the life of me why the Kinematic ball under the camera, keeps passing through the Collider at the bottom.
![alt text][2]
Here's the script for the ball, written in Js.
==========
using UnityEngine; using System.Collections;
public class LoseCollider : MonoBehaviour {
void OnCollisionEnter2D (Collision2D collision) {
print ("Collision");
}
}
==========
And here is the script for the Collider. Any help for this would be IMMENSELY appreciated. Thanks all :)
Answer by AcidicPaper · Jan 08, 2016 at 02:25 AM
EDIT: Sorry, for some reason the screenshot for the Ball didn't enter correctly. The screen shot is the one at the bottom, 178.7 kB.