Hello, I am having a little problem with my project I am trying to do. I am trying to have two objects collide with each other and it keeps passing through each other. For example, I two cubes in the scene and when I use the “OnMouseDrag” function to move the cubes, it just passes through each other and wont collide. I tried everything but nothing seems to work. I tried the mesh collider but I dont think I am doing it correctly. My objective is to have the objects (cubes in this case) not to collide. Can anyone please help me identify the problem? Thanks
Here is the code:
function OnTriggerEnter(collision: Collider){
if(collision.gameObject.tag == "blue"){
print("blue");
}
function OnMouseDrag(){
if(collision.gameObject.tag == "blue"){
print("blue");
}
function OnCollisionEnter(collision: Collision){
if(collision.relativeVelocity.magnitude > 1)
{
print("excellent");
}