I Wanna Community

Fangames => Game Design => Topic started by: WetWookie on December 04, 2016, 12:23:20 AM

Title: Fix for bullets skipping past objects that are thinner than the bullet's speed
Post by: WetWookie on December 04, 2016, 12:23:20 AM
Put this in the End Step Event of the object being shot
Code: [Select]
with objBullet
{
    if collision_line(x,y,xprevious,yprevious,other.id,true,false)
    {
       //x=xprevious; //Optional move bullet back
       //y=yprevious;
       //move_contact_all(direction,speed);
       with other
       {
            event_perform(ev_collision,other.object_index);
       
       }
    }
}