コード例 #1
0
 /// <summary>
 /// Create the kinematic body from shape info.
 /// </summary>
 /// <param name="shapeInfo">Body shape info.</param>
 public KinematicBody(IBodyShapeInfo shapeInfo)
 {
     CreateBody(shapeInfo.CreateShape());
 }
コード例 #2
0
 /// <summary>
 /// Create the physical body.
 /// </summary>
 /// <param name="shapeInfo">Body shape info.</param>
 /// <param name="mass">Body mass (0 for static).</param>
 /// <param name="inertia">Body inertia (0 for static).</param>
 /// <param name="friction">Body friction.</param>
 public RigidBody(IBodyShapeInfo shapeInfo, float mass = 0f, float inertia = 0f, float friction = 1f)
 {
     CreateBody(shapeInfo.CreateShape(), mass, inertia, friction);
 }