public BecomeDynamic ( float mass ) : void | ||
mass | float | Mass to use for the entity. |
return | void |
public void BecomeDynamic(float mass)
{
Matrix3x3 inertiaTensor = collisionInformation.Shape.ComputeVolumeDistribution();
Matrix3x3.Multiply(ref inertiaTensor, mass * InertiaHelper.InertiaTensorScale, out inertiaTensor);
BecomeDynamic(mass, inertiaTensor);
}
Entity::BecomeDynamic ( float mass, |
public BepuBody(Entity realBody) { RealBody = realBody; RealBody.Tag = -1; RealBody.BecomeDynamic((float)_mass); //RealBody.CollisionInformation.LocalPosition = new Vector3(0, 0, -10); //center of mass? BepuEntityCollidableToBepuBody.Add(realBody.CollisionInformation, this); //TODO. fix after new bodies. /* RealBody.CollisionInformation.Events.InitialCollisionDetected += (thisBody, other, x)=> { if (other is EntityCollidable) Body.RaiseCollisionEvent(BepuEntityCollidableToBepuBody[other as EntityCollidable].Body); };*/ //IsStatic = false; }