Hi everyone. I'm trying to find a way to create a physics object that doesn't interact solidly with other objects. Something where the two objects wont immediately bounce off each other, and be able to pass through but interacts a little.
This is a bit difficult to explain; sorry if it doesn't make sense. I'm trying to have a hoop interact a little with basketballs. I was thinking a rectangle object on a joint but I worry that they will occasionally go above the hoop and interact in wierd ways.
partially solid object
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: partially solid object
A hoop is completely solid, it's just it's a three-dimensional object with a hole in the middle, that's why balls can pass through it. I'm stating the obvious but you need a firm grasp of this. In 2d you can simply use a slice of this hoop - two rigidly connected circles - and draw a fake solid graphics of the hoop on top.
To answer your question properly, you create objects that don't respond to collisions automatically, instead you create a manual collision response function that takes the collision normals and depths and applies the displacement (to move objects out of each other) only partially, or whatever other method of collision interaction is suitable.
To answer your question properly, you create objects that don't respond to collisions automatically, instead you create a manual collision response function that takes the collision normals and depths and applies the displacement (to move objects out of each other) only partially, or whatever other method of collision interaction is suitable.
Re: partially solid object
I mean I'm completely aware of that. But it has a special movement and interaction that is very different than the rim itself.
So it sounds like I would have to create a custom function for that and there isn't some sort of built in function to make it less interactive with other objects without filtering it entirely?
Re: partially solid object
Yeah pretty much. Box2d is for simulating rigid objects, and being rigid implies being completely solid, but you can do something different with custom collision response functions. If your application is actually just a hoop physics in 2d then you should use a pair of solid circles at the edge of the hoop rim. There's also a sort of "layer" system but it's for switching collision detection between objects on and off entirely.
Re: partially solid object
Yeah, that part is already done. The net physics would just make it feel a lot more real. Is the function to filter what can collide fixture:setFilterData()? https://love2d.org/wiki/Fixture:setFilterData
Re: partially solid object
For net you should also use it's 2d slice equivalent. That is, a bunch of solid blocks connected in a flexible chain, and also distance-constrained with their opposite pair.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], slime and 203 guests