J
jason
Guest
I am using a controller object with a step event that allows a users to create a selected physics fixture with the left mouse button. I would like to add a delete mode or have the right mouse button delete a fixture that is clicked on. I have tried several ways and have been able to make all instances destroy, but can't seem to have just the instance that is clicked on destroyed.
I'm currently trying with instance_place and have tried with place_meeting, but have been unable to accomplish this.
Any advice would be greatly appreciated.
var hit;
hit = instance_place(mouse_x, mouse_y, obj_base);
if (mouse_check_button(mb_right)) && (hit != noone)
{
with (hit) instance_destroy();
{
instance_destroy();
}
}
I'm currently trying with instance_place and have tried with place_meeting, but have been unable to accomplish this.
Any advice would be greatly appreciated.
var hit;
hit = instance_place(mouse_x, mouse_y, obj_base);
if (mouse_check_button(mb_right)) && (hit != noone)
{
with (hit) instance_destroy();
{
instance_destroy();
}
}