Windfield and collisions

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
tehtehp
Prole
Posts: 1
Joined: Tue Feb 15, 2022 1:23 pm

Windfield and collisions

Post by tehtehp »

I'm currently using a physics module called windfield. I'm having trouble with collisions. Especially when two rectangle colliders are side by side on same surface. Player sometimes bumps into it as if it is a wall. Also collisions with wall when player is grounded is tricky. I wonder if there is a solution to this?

Code for creating colliders from Tiled:

Code: Select all

		for i, obj in pairs(self.level.layers["Platforms"].objects) do
			local platform = World:newRectangleCollider(obj.x, obj.y, obj.width, obj.height)
			platform:setType("static")
			platform:setCollisionClass("Platform")
       	 	end
Example: Player (red box) bumps between two colliders
Image
User avatar
darkfrei
Party member
Posts: 1186
Joined: Sat Feb 08, 2020 11:09 pm

Re: Windfield and collisions

Post by darkfrei »

Best collision function ever: https://love2d.org/wiki/BoundingBox.lua
:awesome: in Lua we Löve
:awesome: Platformer Guide
:awesome: freebies
User avatar
dusoft
Party member
Posts: 531
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Windfield and collisions

Post by dusoft »

darkfrei wrote: Tue Feb 15, 2022 5:08 pm Best collision function ever: https://love2d.org/wiki/BoundingBox.lua
Only for squares and rectangles, but indeed this is one of the simplest ones and it's pretty efficient.
User avatar
veethree
Inner party member
Posts: 875
Joined: Sat Dec 10, 2011 7:18 pm

Re: Windfield and collisions

Post by veethree »

This is a common issue. See here and here.
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests