public override Component CreateCollider(Vector3 position, TileInstance tile) { var collider = pool.RequestComponent(); collider.center = position; collider.size = config.size3D; collider.isTrigger = config.isTrigger; collider.sharedMaterial = config.material3D; return(collider); }
public override Component CreateCollider(Vector3 position, TileInstance tile) { var collider = pool.RequestComponent(); collider.offset = position; collider.radius = config.radius; collider.isTrigger = config.isTrigger; collider.sharedMaterial = config.material2D; return(collider); }
public override Component CreateCollider(Vector3 position, TileInstance tile) { var collider = pool.RequestComponent(); collider.isTrigger = config.isTrigger; collider.sharedMaterial = config.material3D; if (tile.hasSprite) { UpdateBoxShape(collider, position, tile.sprite.bounds); } return(collider); }
public override Component CreateCollider(Vector3 position, TileInstance tile) { var collider = pool.RequestComponent(); collider.offset = position; collider.isTrigger = config.isTrigger; collider.sharedMaterial = config.material2D; if (tile.hasSprite) { UpdatePolygonColliderShape(collider, tile.sprite); } return(collider); }