Breezefield: a lightweight windfield alternative (love.physics wrapper)
Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)
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)
I've implemented queryEdgeArea and fixed some bugs with querying.
Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)
how to make objects move in winfield
-
- Citizen
- Posts: 55
- Joined: Sat Dec 03, 2022 7:52 pm
Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)
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!
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)
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.
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.
-
- Citizen
- Posts: 55
- Joined: Sat Dec 03, 2022 7:52 pm
-
- Prole
- Posts: 15
- Joined: Fri Jul 05, 2024 6:39 pm
Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)
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)
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.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.
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)
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.
-
- Prole
- Posts: 15
- Joined: Fri Jul 05, 2024 6:39 pm
Re: Breezefield: a lightweight windfield alternative (love.physics wrapper)
I call it like this:
british.collider = world:newCollider('Rectangle', {british.x, british.y, 50, 39, 5})
british.collider:setFixedRotation(true)
british.collider = world:newCollider('Rectangle', {british.x, british.y, 50, 39, 5})
british.collider:setFixedRotation(true)
Who is online
Users browsing this forum: Google [Bot] and 0 guests