public override IntPtr CreateCollider(bool applyOffset) { Matrix4x4 offsetMatrix = Matrix4x4.identity; Quaternion rotation = Quaternion.Euler(0.0f, 0.0f, 90.0f); offsetMatrix.SetTRS(Vector3.zero, rotation, Vector3.one); IntPtr collider = IntPtr.Zero; if (Chamfered) { collider = NewtonAPI.NewtonCreateChamferCylinder(NewtonWorld.Instance.pWorld, Radius0, Height, 0, ref offsetMatrix); } else { collider = NewtonAPI.NewtonCreateCylinder(NewtonWorld.Instance.pWorld, Radius0, Radius1, Height, 0, ref offsetMatrix); } NewtonAPI.NewtonCollisionSetScale(collider, Scale.x, Scale.y, Scale.z); return(collider); }