How do I Tile an Object to two X,Y points?

  • Just to keep it simple I will use simple math.

    From 45,45 to 90,90 I would like to know how to tile an object until it touches the other point.

    The two points may change at times. It may change to 0,0 to 45,45 or 45,45 to 135,135.

    The angle will always be the same 45° and only the length will change. The length will only change in increments of the tiled object, meaning when the length increases one more object should be tiled at the end.

    I am just unsure how to tile an object at an angle.

    It may be more simple to have a line drawn and then tile on the line every X pixels, not sure how to do that either.

  • Are you using TileBackground or TileMap ?

  • I am using Tile-Background.

    Note: I changed the numbers around. I was in a hurry when I typed it and it was bad math.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you use TileMap it might be easier, here is a half done demo as I have to head off to dinner soon.

    https://dl.dropboxusercontent.com/u/108 ... Arrow.capx

    If you want to use TileBackground, I fear you can only go at right angles and with a repeating grid. You may want to look at using a sprite instead (But I still feel TileMap is best)

  • I may be adding nodes to the map. I may be able to apply them with nodes since it is the same image tiled at the same angle. I will look at the example. Thanks

  • The example is pretty neat. I am not sure exactly how it applies to what was asked though. I will hold on to it and reference it for another project at a later time. I understood what you meant by using a tile-map. Since it is the same angle I could just use a tile-map to apply the images.

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