Search found 10 matches

by Path
Tue Jun 13, 2017 9:01 am
Forum: Support and Development
Topic: [FIXED] decimal discrepancy on x and y
Replies: 1
Views: 1672

Re: decimal discrepancy on x and y

Okay so i found out the issue. The collision detection function, https://love2d.org/wiki/BoundingBox.lua , actually uses a 'less than' sign when it should be using a 'less than or equal to'. this was causing the discrepancy. sorry for posting so soon without testing that part properly!
by Path
Tue Jun 13, 2017 8:58 am
Forum: Support and Development
Topic: [FIXED] decimal discrepancy on x and y
Replies: 1
Views: 1672

[FIXED] decimal discrepancy on x and y

So i have a tilemap and a player all with collision boxes set up, and i tried doing collision tests between the blocks and the player. i'm using the following collision function to detect it: function CheckCollision(rect1, rect2) local x1,y1,w1,h1 = rect1.x,rect1.y,rect1.width,rect1.height local x2,...
by Path
Sun Jun 11, 2017 7:23 pm
Forum: Support and Development
Topic: Rotating collision with a rotating map
Replies: 8
Views: 6537

Re: Rotating collision with a rotating map

Alright so i found a solution to what i'm saying. To get collision points to rotate and transform alongside the visual tilemap, i rotated all the points around the same origin the map was on, which produced good results https://love2d.org/imgmirrur/WvpPKsp.gif dx = xvertex - xaxis dy = yvertex - yax...
by Path
Sun Jun 11, 2017 11:38 am
Forum: Support and Development
Topic: Rotating collision with a rotating map
Replies: 8
Views: 6537

Re: Rotating collision with a rotating map

May i know what you use for your collision boxes? im using boundingbox.lua which was on the love site https://love2d.org/wiki/BoundingBox.lua im trying to avoid using actual physics and rather revert to simple gravity and velocity for the project, but i do want some form of collision, working at le...
by Path
Sun Jun 11, 2017 11:16 am
Forum: Support and Development
Topic: Rotating collision with a rotating map
Replies: 8
Views: 6537

Re: Rotating collision with a rotating map

You can use love.graphics.rotation() to rotate all of your visuals. And with love.graphics.translate(), you can easily get the points the problem is that collision boxes aren't rotated by love.graphics.rotation, only the tiles are. the collision boxes are just coordinates that are being defined. an...
by Path
Sun Jun 11, 2017 10:04 am
Forum: Support and Development
Topic: Rotating collision with a rotating map
Replies: 8
Views: 6537

Re: Rotating collision with a rotating map

hi, this is what my map is doing Screen Shot 2017-06-11 at 3.00.22 AM.png this is one position where the map's rotation is 0. however, the game i'm making will have the map rotate in order to manipulate physics objects on the map, sort of like a pachinko puzzle, or one of these things https://img1.p...
by Path
Sun Jun 11, 2017 9:12 am
Forum: Support and Development
Topic: Rotating collision with a rotating map
Replies: 8
Views: 6537

Rotating collision with a rotating map

Hi, i'm using a tile map that rotates around its center, and i need consistent collision on each tile that will stay in the exact location and rotation as each tile. the issue is that all the tiles are rendered through love.graphics.draw, and when i rotate them with love.graphics.rotate and love.gra...
by Path
Fri Jun 09, 2017 1:20 am
Forum: Support and Development
Topic: [HELP] toString and toNumber - always a nil value
Replies: 1
Views: 1948

[HELP] toString and toNumber - always a nil value

Hi, i'm using the latest version of love2d on a mac. When using toString or toNumber, i will always 100% of the time get a global index error saying that it's a nil value. toString(55) --attempt to call global tostring (a nil value) toNumber("55") --attempt to call global tonumber (a nil v...
by Path
Fri Nov 20, 2015 5:13 am
Forum: Support and Development
Topic: [Help] Distorting Map in a circle/Circular Distortion
Replies: 5
Views: 3763

Re: [Help] Distorting Map in a circle/Circular Distortion

Shaders should be a good option. Look at the CRT Shader used in Shine , it can be modified to do what you want. Thank you for suggesting that to me. I'll take a look at some of the features included in Shine. However, from the looks of it, it appears to be used purely for post image processing and ...
by Path
Tue Nov 17, 2015 8:17 pm
Forum: Support and Development
Topic: [Help] Distorting Map in a circle/Circular Distortion
Replies: 5
Views: 3763

[Help] Distorting Map in a circle/Circular Distortion

I'll keep this simple. I'm rather new to lua and Löve2d in general. I've had no previous experience with any of its features, and i'm doing heavy experimentation on the features and functions. I'm also very young and extremely unknowledgeable in advanced algorithms and such. I'm trying to apply a ci...