/** * @brief Create the internal shape used to represent a TSBoxCollider. **/ public override SyncFrame.Physics2D.Shape CreateShape() { TSVector size3 = new TSVector(size.x, size.y, 1); TSVector sizeScaled = TSVector.Scale(size3, lossyScale); return(new SyncFrame.Physics2D.PolygonShape(SyncFrame.Physics2D.PolygonTools.CreateRectangle(sizeScaled.x * FP.Half, sizeScaled.y * FP.Half), 1)); }
protected override Vector3 GetGizmosSize() { return(TSVector.Scale(size, lossyScale).ToVector()); }
/** * @brief Create the internal shape used to represent a TSBoxCollider. **/ public override Shape CreateShape() { return(new BoxShape(TSVector.Scale(size, lossyScale))); }
protected override Vector3 GetGizmosSize() { TSVector size3 = new TSVector(size.x, size.y, 1); return(TSVector.Scale(size3, lossyScale).ToVector()); }