I am new at BEPUPhysics but I have to say a very cool engine!
My experience:
I don't have much experience with Physics Engine.
I have been playing around with BEPUPhysics in my free time in the evenings for the last 3-4 weeks.
---
My question about BEPU v1:
When I use dynamic objects and they collide, the impulse/impact is very strong and the object push and change the velocity of each other.
is there a good possibility in BEPUPhysics that in a collision the objects do not give an impulse to each other just simply stop moveing (blocked) if an object block the way of the velocity. Stop/block without overlapping each other.
i have tried to visualize my idea... hop it helps to understand it better
I have written the following code lines once for testing purposes but it not realy works as expected.
What is the best way to solve collisions in a custom way in BEPU v1? or with zero pushing/impules?
Code: Select all
var position = Converter.Convert(transform.position); // convert Unity Vector3 to BEPU Vector3
var entity = new Box(position, 1, 1, 1, 1);
entity.LinearVelocity = Vector3.Zero;
entity.LinearDamping = 0.1;
entity.LocalInertiaTensor = new Matrix3x3(0, 0, 0 ,0, 0, 0, 0, 0, 0);
entity.CollisionInformation.CollisionRules.Personal = CollisionRule.NoSolver;
var events = entity.CollisionInformation.Events;
events.CreatingContact += (sender, other, pair, contact) =>
{
var velocityDirection = Vector3.Normalize(sender.entity.LinearVelocity);
var pos = -velocityDirection * contact.PenetrationDepth;
sender.entity.Position += pos;
sender.entity.LinearVelocity = Vector3.Zero;
};
Why v1:
I need a physics simulation which is cross platform/machine deterministic.
I found https://github.com/sam-vdp/bepuphysics1int. which replaces float with fixed-point integer math in BEPU v1.