Search found 7 matches

by TheFriendlyFoe
Wed May 25, 2022 4:00 pm
Forum: Libraries and Tools
Topic: Outline: Polygon Physics Detection Library
Replies: 1
Views: 2546

Outline: Polygon Physics Detection Library

Simple physics detection library I made. It is composed of polygons and detects if the lines of two polygons intersect. That means if one polygon is fully inside another then it returns false. This can be useful for things like making sure they player is staying in bounds. Polygons can be made with ...
by TheFriendlyFoe
Tue Apr 26, 2022 3:39 pm
Forum: Support and Development
Topic: calling functions from a table
Replies: 3
Views: 1857

Re: calling functions from a table

Thanks pgimeno, that works perfectly!
by TheFriendlyFoe
Mon Apr 25, 2022 3:31 pm
Forum: Support and Development
Topic: calling functions from a table
Replies: 3
Views: 1857

calling functions from a table

In my game I have a menu with a lot of buttons, each with a number. That number is associated with a function to call when the button is pressed. Instead of having a super long "if-else-chain" to call the right function, I wanted to make a for loop. I can't figure out how to call a functio...
by TheFriendlyFoe
Fri Apr 01, 2022 1:18 pm
Forum: Support and Development
Topic: Not letting box2d physics resolve
Replies: 3
Views: 2404

Re: Not letting box2d physics resolve

Ok I did some research and I think I found the solution: setting the fixtures to sensors. This is the simple answer for anyone else who needs it. You can do it by doing something like this:
fixture:setSensor(true)
by TheFriendlyFoe
Fri Apr 01, 2022 11:24 am
Forum: Support and Development
Topic: Not letting box2d physics resolve
Replies: 3
Views: 2404

Re: Not letting box2d physics resolve

Thanks for the suggestion but the problem is I have a ton of not axis-aligned rectangles. I'm making a racing game and the tracks are make with many rectangles on the outside.
by TheFriendlyFoe
Thu Mar 31, 2022 8:17 pm
Forum: Support and Development
Topic: Not letting box2d physics resolve
Replies: 3
Views: 2404

Not letting box2d physics resolve

I have a game, but I don't want box2d to resolve any of the collisions, I want to code my own resolutions to collisions. Is there a way I can turn off the physics between fixtures while still being able to get if 2 fixtures are touching?
by TheFriendlyFoe
Mon Mar 28, 2022 4:20 pm
Forum: Support and Development
Topic: Turning off physics collisions
Replies: 1
Views: 2016

Turning off physics collisions

I want to make my track collide with my car, but only in the way I choose to. I'm using the isTouching functions to check when I hit the edge of the track so I can then put it at the start of the track. The current problem is the track moves slightly every time I crash into it because the physics en...