How do I draw trajectory from sprite

0 favourites
  • 7 posts
From the Asset Store
Calculate parabolic trajectories and tween objects over them.
  • Hi, how would you draw on screen, with a line, a trajectory from a moving sprite in Construct 2?

    I would think to draw a 1px sprite every tick at sprite position, but using that much sprites sounds like not optimized at all ...

    Do you think of any other way ? Even if it requires to write a plugin ?

    Thanks for helping

  • You could use the canvas or paster plugins to draw.

  • sounds like an idea, thanks !

    I guess this is it :

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Those plugins are doing exactly what we asked for, especially Canvas.

    But I'm using big layouts (3000~5000px) and it create a massive stuttering when drawing on such big canvas. (and I have a good computer ...)

    Paster has no problem, though, but I can't draw a clean line with quads ... (maybe i'm wrong ?)

    It has another problem : impossibility to delete the lines except if you clear the canvas.

    In the end I switched back to particles ... It doesnt make lines but it can draw a path with dots ...

  • The canvas plugin is slow when webgl is on.

    With paster you can make a line with a quad, but it's easier to paste a sprite positioned like a line.

    Both plugins are just something you can draw to. To be able to remove indavidual lines you need each line to be it's own object, and you can do that with sprites.

  • Curved or straight trajectory? Straight you can just stretch a 1px tall line sprite as long as you need it, curved you can break it up into x pieces with some creative lerping.

  • the stretched pixel is a pretty good idea, actually ! Thanks !

    I still need to learn how to use lerp beside that

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