How do I stretch and distort a sprite? [SOLVED]

0 favourites
  • 6 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • hi,

    I'm making a "tractor beam" for a space game. As the beam grows (I increase the width) I want it to flare out.

    My tractor beam is a long wide rectangle: 100x10

    I want one end to become taller i.e. one side to be 100x10 while the other end is say 100x50..

    and this whole thing needs to stretched to variable length.. I was looking into a WebGL effect but I couldn't find any I could control like that..

    any suggestions?

  • An effect could be made to do it, but I haven't seen any yet. One way to do it is using the Paster Plugin which allows you to specify the corners of a quad to draw on.

  • I think I would draw the beam as you want In one sprite. Then when deployed you increase size from 0,0 at width+10 hight+2 until it hits the object in question. Or what ever growth fits right.

  • thanks R0J0hound ... wow, this is great. I will try this out!

    TonyW that's not a bad idea, so just stretch and maybe add some scale as well..

    thanks guys! I will post when I figure out what I'll do...

  • TonyW yup that was the easiest way to do it.. thanks..

    just like you said I made the full beam like a slight trapezoid and adjusted the height and width without preserving aspect ratio in code as the beam was 'growing' or 'shrinking'.


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • cool! i would love to see the finished project!

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