예제 #1
0
    void DragShape()
    {
        if (select != null)
        {
            select.Position = mouseOffset + mousePoint;
            select.SetColor(Color.white);
            select.RigidbodyType = RigidbodyType.Kinmatic;
        }
        else
        {
            ShapeObject[] shapes = ShapesCollision.OverlapPoint(mousePoint);
            if (shapes.Length <= 0)
            {
                return;
            }
            if (shapes[0].RigidbodyType == RigidbodyType.Static)
            {
                return;
            }

            select      = shapes[0];
            selectType  = select.RigidbodyType;
            mouseOffset = select.Position - mousePoint;
        }
    }
예제 #2
0
 internal static RigidbodyInternal Create()
 {
     return(new RigidbodyInternal {
         CollisionShapes = new(),
         rigidbodyType = RigidbodyType.Static,
     });