Page 2 of 2

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Sat May 25, 2019 11:34 am
by TheHUG
following viewtopic.php?f=4&t=86610 I've made another update - I've ensured breezefield doesn't export any global variables that could interfere with globals defined in the game.

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Sun Jan 03, 2021 8:07 am
by TheHUG
I've implemented queryEdgeArea and fixed some bugs with querying.

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Fri Aug 12, 2022 10:59 pm
by A-lox
how to make objects move in winfield

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Sun Feb 12, 2023 7:56 pm
by SugarRayLua
Hi. I'm a newbie learning physics in Love2d and found both your Breezefield library and the Winfield library are great helps to simplify my coding.

Can Breezefield create angle rotated shapes like one can with this love.physics base command:

shape = love.physics.newRectangleShape( x, y, width, height, angle ) ?

It doesn't look like one can do that with the Winfield library but wasn't sure if it was possible in your Breezefield library.

Thanks!

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Sat Oct 14, 2023 9:36 am
by TheHUG
Hi, sorry for the late reply. `world:newCollider('Rectangle', {x, y, w, h, a})` would do the trick. Any args that would be passed to love.physics.<shape> can be put in that second argument.

A-lox, breezefield wraps existing love2d physics functionality. To move a Collider, you can use any method you can normally use from a Body, Fixture or Shape. For movement that would be things like setX, setY, setLinearVelocity, applyForce. See here: https://love2d.org/wiki/Body for all the various options.

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Mon Oct 16, 2023 6:16 am
by SugarRayLua
Thanks! 😊

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Thu Aug 08, 2024 11:11 pm
by ThatBoiNavy
I think I might have found an error in world.lua... at line 299 it says "attempted to call method "upper" (a nil value). Im not sure if anyone else is having this problem as right now it is breaking my game.

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Mon Aug 12, 2024 2:26 pm
by TheHUG
ThatBoiNavy wrote: Thu Aug 08, 2024 11:11 pm I think I might have found an error in world.lua... at line 299 it says "attempted to call method "upper" (a nil value). Im not sure if anyone else is having this problem as right now it is breaking my game.
Hi! I've updated the tests to verify that the line in question works. How are you calling the `newCollider` method? the first argument (excluding 'self' of course) should be a string.
I'll make a new PR to provide a more informative error message if the value passed is not a string.

I would be grateful if you could take a look at the change to world.lua here and let me know if it would have prevented your issue: https://github.com/HDictus/breezefield/pull/24

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Mon Aug 12, 2024 2:59 pm
by pgimeno
Problems like this have arisen with many libraries, and have been raised in the forums often. This user ran into the issue with one specific method, but it's likely that it could have happened with many other methods, and even with many other libraries. Patching every method of every library would make them bloated and slower, which is probably why almost no library creator holds the user's hand to that point.

Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)

Posted: Fri Aug 23, 2024 2:08 pm
by ThatBoiNavy
I call it like this:
british.collider = world:newCollider('Rectangle', {british.x, british.y, 50, 39, 5})
british.collider:setFixedRotation(true)