How do I keep precise distance between objects

  • Hi!

    Let's say we have objects spawning every X seconds and then moving around a block (see attached picture). How do I make sure there is a precise distance between the objects? At first, spawning them every X seconds did provide an equal distance between all of the objects but later I noticed that sometimes there was a difference in the distance between them (sometimes they even overlap each other). So, how do I keep a precise distance between all of those objects and make sure it stays like this despite any conditions?

    I'll appreciate any help.

  • Could you record the X and/or Y value of the already existing sprite, then spawn to that position +/- the precise distance you want?

    Spawn at position ExistingSprite.X-PreciseDistance, ExistingSprite.Y-PreciseDistance

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Could you record the X and/or Y value of the already existing sprite, then spawn to that position +/- the precise distance you want?

    Spawn at position ExistingSprite.X-PreciseDistance, ExistingSprite.Y-PreciseDistance

    I will try and see if it works in my case. Thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)