BEPU for Physics Modeling

Discuss any questions about BEPUphysics or problems encountered.
fezzick22
Posts: 13
Joined: Mon Jul 25, 2011 3:54 am

Re: BEPU for Physics Modeling

Post by fezzick22 »

Ok I think I know why the objects are not colliding. I was using teleporting to adjust some positions which meant there was no change in velocity of the compound objects. I am fixing this now.
fezzick22
Posts: 13
Joined: Mon Jul 25, 2011 3:54 am

Re: BEPU for Physics Modeling

Post by fezzick22 »

Let me clarify my situation. I am currently also dealing with growing cones. That is to say the cones get larger over time. For example, a cone and a sphere hit, stick together, and the cone grows to twice it's size. However, I seem to be having issues with the compound body collision detection when two compound bodies with growing cones hit each other. I know this is a complex problem, but due to the fact that I am also using some teleporting (modifying position) to ensure that the sphere and cone don't collide... I guess I could be causing some collision issues with the compound bodies in this case?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: BEPU for Physics Modeling

Post by Norbo »

Imuutable? Sorry I am not sure I follow.
By immutable, I meant that compounds cannot currently have shapes removed from them without recreation or reinitialization. This is something I'd like to change in v0.17.0.
However, I seem to be having issues with the compound body collision detection when two compound bodies with growing cones hit each other. I know this is a complex problem, but due to the fact that I am also using some teleporting (modifying position) to ensure that the sphere and cone don't collide... I guess I could be causing some collision issues with the compound bodies in this case?
The more teleportation and nonphysical behaviors going on, the more likely that things won't look right. Note that changing the dimensions of a shape will not change the velocity that any contact sees. Collision response would have to rely on position correction to keep things separated since there is no velocity error to correct. This will work, it's just squishier looking and less rigid. If the sphere is teleporting at the same time as the cone is growing, then any collisions with the sphere will also be subject to this.
fezzick22
Posts: 13
Joined: Mon Jul 25, 2011 3:54 am

Re: BEPU for Physics Modeling

Post by fezzick22 »

Thanks for the explanation. I have dealt with the compound body issue in that I have to create a new one every time the cone grows. However, the issue I am currently running into is that the compound bodies do not appear to be intersecting each other correctly. It sounds like there is not an easy solution to this for my particular application. Therefore I am going to try a constraint based method and will let you know how that progresses. Thanks for all the help, really appreciate it!
fezzick22
Posts: 13
Joined: Mon Jul 25, 2011 3:54 am

Re: BEPU for Physics Modeling

Post by fezzick22 »

Ok so I used the constraints method and it appears to be working much better. The desired behavior can be achieved with relative ease. However, I am having a few issues. Sometimes when I try to remove constraints from the engine, I get an error that they do not exist. Could you explain how the engine handles constraints, i.e. if the entities on a constraint are removed is the constraint disposed?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: BEPU for Physics Modeling

Post by Norbo »

If the message is that "Solver updateable doesn't belong to this solver; it can't be removed," that means the constraint has already been removed or was never added. For constraints like the BallSocketJoint, there is nothing in the engine which automatically adds or removes the joint. Removing entities from a space should not cause associated constraints to be removed or disposed.

ContactManifoldConstraints and other NarrowPhase-created constraints will be created and removed automatically, though.
Post Reply