Search found 14 matches
- Mon Jul 06, 2020 10:38 pm
- Forum: Support and Development
- Topic: How to detect a collision between two points in an array and a rotating line?
- Replies: 2
- Views: 2339
Re: How to detect a collision between two points in an array and a rotating line?
A line can be described as "y * sin(a) + x * cos(a) - p = 0". If the line goes through the origin, you can ignore the "-p". If you know the angle (a), just fill in the x value from your point, then solve for y (or vice versa). y = (x * cos(a)) / (- sin(a)) If y is close to your ...
- Sat Jul 04, 2020 10:49 pm
- Forum: Support and Development
- Topic: How to detect a collision between two points in an array and a rotating line?
- Replies: 2
- Views: 2339
How to detect a collision between two points in an array and a rotating line?
Hey, I'm just wondering how I could go about detecting the collision between a line and set of two points within an array/table. I say array/table because honestly I'm not sure what the correct terms are. Once the line and point intersects, I'd like it to return the X and Y position of the point. De...
- Sat Jul 04, 2020 9:05 pm
- Forum: Support and Development
- Topic: Drawing a line where a circle goes
- Replies: 3
- Views: 4456
- Wed May 29, 2019 7:49 pm
- Forum: Support and Development
- Topic: Drawing a line where a circle goes
- Replies: 3
- Views: 4456
Drawing a line where a circle goes
Hello, I was just wondering, how would I go about drawing a line where a circle has already been, a bit this picture of where the ISS has been. I've attached a copy of the code. I also feel obligated to tell you that this isn't my code, which is also part of the reason I don't know how to do this. I...
- Thu Feb 21, 2019 10:05 pm
- Forum: Support and Development
- Topic: [SOLVED cause im stupid] I don't even know what to title this, sorry.
- Replies: 2
- Views: 3547
Re: I don't even know what to title this, sorry.
I think you might mean: if key == 'escape' then if escKey == 0 then escKey = 1 music:pause() bgm:play() love.mouse.setVisible(true) --PAUSE THE GAME else escKey = 0 music:resume() love.audio.stop(bgm) love.mouse.setVisible(false) --CONTINUE THE GAME end end Thank you very much sir! Wow, what takes ...
- Thu Feb 21, 2019 9:28 pm
- Forum: Support and Development
- Topic: [SOLVED cause im stupid] I don't even know what to title this, sorry.
- Replies: 2
- Views: 3547
[SOLVED cause im stupid] I don't even know what to title this, sorry.
I have an extremely strange issue which I haven't been able to solve for about two weeks now. I have 6 .lua files, each a different screen for parts of my game. When I get moved to deathScreen.lua (which is normal) and press any key, my music goes silent (not normal). I do have other files and I'll ...
- Thu Feb 21, 2019 4:59 pm
- Forum: Support and Development
- Topic: Opposite colors to the background
- Replies: 10
- Views: 7696
Re: Opposite colors to the background
Yep, would be nice if these would be options; not sure whether GL and GL ES version intercompatibility is the barrier to this or not though. https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glBlendFuncSeparate.xml https://www.khronos.org/registry/OpenGL-Refpages/es2.0/xhtml/glBlendEquat...
- Thu Feb 21, 2019 2:41 pm
- Forum: Support and Development
- Topic: Opposite colors to the background
- Replies: 10
- Views: 7696
Re: Opposite colors to the background
An 'invert' blendmode would be useful to have. This is by far the easiest way to do it and it doesn't require shaders. It should be possible using the "subtract" blend mode but I've never been able to get it working in Love2D. Yeah, but the code he's given me works perfectly for what I ne...
- Thu Feb 21, 2019 1:15 pm
- Forum: Libraries and Tools
- Topic: 3D engine
- Replies: 23
- Views: 24419
Re: 3D engine
- Thu Feb 21, 2019 1:13 pm
- Forum: Support and Development
- Topic: Opposite colors to the background
- Replies: 10
- Views: 7696
Re: Opposite colors to the background
Edit: Oops, ninja'd by grump :nyu: You need a shader. If your background is not an image, you also need a canvas where you draw the background. The shader would be like this: local shader = love.graphics.newShader[[ extern Image background; vec4 effect(vec4 colour, Image texture, vec2 texpos, vec2 ...