From 146d67d91d4f3a7c9f910bd2cafd7ebbe50ea87e Mon Sep 17 00:00:00 2001 From: 06wj <06wj@163.com> Date: Mon, 15 Jan 2024 15:03:26 +0800 Subject: [PATCH] Fix the bug where the vertex count is incorrect when the cylinder has a cap. (#16660) --- cocos/primitive/cylinder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/primitive/cylinder.ts b/cocos/primitive/cylinder.ts index 57fadfc4ff..4efe6c7770 100644 --- a/cocos/primitive/cylinder.ts +++ b/cocos/primitive/cylinder.ts @@ -60,7 +60,7 @@ export default function cylinder (radiusTop = 0.5, radiusBottom = 0.5, height = const arc = opts.arc || 2.0 * Math.PI; let cntCap = 0; - if (!capped) { + if (capped) { if (radiusTop > 0) { cntCap++; }