Skip to content

Commit

Permalink
Fix the bug where the vertex count is incorrect when the cylinder has…
Browse files Browse the repository at this point in the history
… a cap. (cocos#16660)
  • Loading branch information
06wj authored Jan 15, 2024
1 parent cba55fa commit 146d67d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos/primitive/cylinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
Expand Down

0 comments on commit 146d67d

Please sign in to comment.