Search found 702 matches
- Mon May 15, 2017 11:47 pm
- Forum: Support and Development
- Topic: Simulated 3D sprite rotation in 2D
- Replies: 4
- Views: 5071
Re: Simulated 3D sprite rotation in 2D
Something like this?
- Tue Apr 25, 2017 5:44 pm
- Forum: General
- Topic: setting rectangle angle ? (not image)
- Replies: 2
- Views: 2448
Re: setting rectangle angle ? (not image)
Example: function rotatingRectangle( mode,x,y,w,h,a,ox,oy,r ) ox = ox or 0 -- if ox & oy not provided, rotate around upper left corner oy = oy or 0 -- if ox,oy = w/2,h/2 then rotation is around center a = a or 0 -- if no angle provided, angle assumed to be zero r = r or 5 -- corner radius love.g...
- Wed Apr 19, 2017 5:53 pm
- Forum: Support and Development
- Topic: Pattern matching
- Replies: 5
- Views: 3157
Re: Pattern matching
I'm not too good with pattern matching but what's wrong with:
or maybe
Code: Select all
str = 'wood|1000'
sep = string.find( str, '|' )
word, value = string.sub( str, 1, sep-1 ), str:sub( sep+1, #str )
Code: Select all
word, value = string.match(str, "(%a+)|(%d+)")
- Wed Apr 19, 2017 2:53 pm
- Forum: Support and Development
- Topic: [SOLVED] Bezier Curves, how to trace a line?
- Replies: 21
- Views: 16108
Re: Bezier Curves, how to trace a line?
Was able to fix constant speed issue for spline but not for Bezier curve.
For what it's worth (drag points to see that speed remains constant)
Best
For what it's worth (drag points to see that speed remains constant)
Best
- Wed Apr 19, 2017 2:37 am
- Forum: Support and Development
- Topic: [SOLVED] Bezier Curves, how to trace a line?
- Replies: 21
- Views: 16108
Re: Bezier Curves, how to trace a line?
May be something like you want. (old love with extraneous code)
Click on control points to see effect,
Click on control points to see effect,
- Wed Apr 19, 2017 2:16 am
- Forum: General
- Topic: [Solved][Issue] "Enable to create OpenGL Window"
- Replies: 4
- Views: 3988
Re: [Issue] "Enable to create OpenGL Window"
Happened to me as well when I upgraded to Windows 10.
Had to return to Windows 7.
Had to return to Windows 7.
- Tue Apr 18, 2017 6:06 pm
- Forum: Support and Development
- Topic: Rotate
- Replies: 13
- Views: 7883
Re: Rotate
As per your request.
Best
Best
- Sun Apr 16, 2017 3:50 pm
- Forum: Support and Development
- Topic: Rotate
- Replies: 13
- Views: 7883
Re: Rotate
If you want to use push and pop, this might help you????
- Sat Apr 15, 2017 10:26 pm
- Forum: General
- Topic: Help me displaying my vector pls x_x
- Replies: 5
- Views: 4873
Re: Help me displaying my vector pls x_x
Something like this?
- Thu Apr 13, 2017 11:55 pm
- Forum: Support and Development
- Topic: Rotate
- Replies: 13
- Views: 7883
Re: Rotate
Simple. With orbit center (cx,cy), orbit radii (rx,ry) and angle, calculate the new location of the object.
Code: Select all
function orbit( cx, cy, rx, ry, an )
local x = rx * math.cos( an ) + cx
local y = ry * math.sin( an ) + cy
return x, y
end