/**
         *  @brief Create the internal shape used to represent a TSBoxCollider.
         **/
        public override TrueSync.Physics2D.Shape CreateShape()
        {
            TSVector size3      = new TSVector(size.x, size.y, 1);
            TSVector sizeScaled = TSVector.Scale(size3, lossyScale);

            return(new TrueSync.Physics2D.PolygonShape(TrueSync.Physics2D.PolygonTools.CreateRectangle(sizeScaled.x * FP.Half, sizeScaled.y * FP.Half), 1));
        }
        protected override Vector3 GetGizmosSize()
        {
            TSVector size3 = new TSVector(size.x, size.y, 1);

            return(TSVector.Scale(size3, lossyScale).ToVector());
        }
예제 #3
0
 protected override Vector3 GetGizmosSize()
 {
     return(TSVector.Scale(size, lossyScale).ToVector());
 }
예제 #4
0
 /**
  *  @brief Create the internal shape used to represent a TSBoxCollider.
  **/
 public override Shape CreateShape()
 {
     return(new BoxShape(TSVector.Scale(size, lossyScale)));
 }