•      Sign In
• Create Account

Banner advertising on our site currently available from just \$5!

### #ActualKaptein

Posted 24 July 2013 - 11:13 AM

the laser sprite is 1060 pixels wide? oh my

do you draw a line on it? then draw the sprite on the sheet?

there are multiple ways to solve this problem, such as just drawing a line from (tankX, tankY) to (objectX, objectY)

the line would be red with some LineWidth = 4.f; or so, if you are using .NET

EDIT: oh right, SFML and c++, i have never used SFML before.. so i can't help you there

but, can't you just draw a line? from A to B..

Depending on how far you want to go, lasers can be complex effects

In the old days, you could combine many small sprites that formed a line, and i'm sure you can do that today too with some alpha+shader magic

Not sure what your options are with SFML though.. sorry

### #2Kaptein

Posted 24 July 2013 - 11:08 AM

the laser sprite is 1060 pixels wide? oh my

do you draw a line on it? then draw the sprite on the sheet?

there are multiple ways to solve this problem, such as just drawing a line from (tankX, tankY) to (objectX, objectY)

the line would be red with some LineWidth = 4.f; or so, if you are using .NET

EDIT: oh right, SFML and c++, i have never used SFML before.. so i can't help you there

but, can't you just draw a line? from A to B..

### #1Kaptein

Posted 24 July 2013 - 11:07 AM

the laser sprite is 1060 pixels wide? oh my

do you draw a line on it? then draw the sprite on the sheet?

there are multiple ways to solve this problem, such as just drawing a line from (tankX, tankY) to (objectX, objectY)

the line would be red with some LineWidth = 4.f; or so, if you are using .NET

PARTNERS