💥Collisions
Big Bang !!!
Collisions
collision 1: blocked
(stops on impact)
collision 2: draggable
(you can push the item)
collision 3: cancels the collision but notifies you with the collisionout function.
collision 0: It doesn't do anything. It passes through objects
Definition
{
collision:1
}
If 2 objects do not collide with the same, there may be trouble.
Function
collisionout = function(obj,obj2,type,fside){
console.log(
obj,//the name of the 1st object
obj2,//the name of the 2st object
type,//tells you which way it hits: top,bottom,left,right
fside//More data on how many degree angles they collide
)
//You don't have to add parameters like fside
}
Last updated