Reputation: 2275
//sorry for bad English
I'm using Game maker. I enabled physics for world. I have an object and I don't want to get involved with the physics for this object. So I didn't enabled "use Physics". When I set collision Event between this object and another object(qube), the function didn't acts. If I enable "use Physics" this function will be called. So my question is: "how enable collision between an object with physics and another non-physics object in game maker
Upvotes: 1
Views: 6246
Reputation: 1777
In object with physics: (end step)
x = phy_position_x
y = phy_position_y
In object without physics: (end step)
if collision_rectangle(bbox_left, bbox_top, bbox_right, bbox_bottom, obj_with_physics, false, true) != noone
{
//collision
}
Upvotes: 5