simple box that works like a line

colinyell's picture

Hi,

Im really stuck and I was wondering if anyone could help me out.

I need to make a sprite behave like a line so I can set the thickness to whatever I want and apply an image as a texture but it transforms like a line from two points.

I have attached a quick drawing to try and explain what I mean.

Does anyone know a simple way of doing this or is there a plugin that can do this?

Any help would be greatly appreciated

Cheers,

Colin

PreviewAttachmentSize
box-help.jpg
box-help.jpg26.55 KB

benoitlahoz's picture
Re: simple box that works like a line

Hi,

Here is a QTZ that makes the thing.

PreviewAttachmentSize
Trigp_SpriteAsLine.qtz34.45 KB

colinyell's picture
Re: simple box that works like a line

Thankyou very much, this is exactly it,

Cheers,

Colin

gtoledo3's picture
Re: simple box that works like a line

Good job! I started something like that last night from finding the angle from two points, but hadn't worked out the scaling yet. Cool composition! :-)