I have bullet object, when i shoot from left to right i want the bullet create a dot every 50 pixels when he fly. Is this possible?
Develop games in your browser. Powerful, performant & highly capable.
Every tick, add Sprite.Bullet.Speed * dt to an instance variable. That tracks the distance travelled. So whenever the instance variable is >= 50, spawn a dot and subtract 50.