Unity-BoxCollider、SphereCollider、CapsuleCollider的性能对比(译文)

BoxCollider、SphereCollider、CapsuleCollider的性能对比

概述

我决定放一些测试数据上来。
Well I decided to post some results from some testing.

所有测试均完成于INTEL二核的3GH处理器,无渲染部分,仅仅是物理部分。
All tests were done on an intel core2duo 3ghz imac with no rendering, just physics.

静态碰撞体几乎没有什么性能开销,高达6万多个不同的碰撞体对性能的影响在一帧之内(<3ms)几乎可以让人忽略不算。
Static colliders seem to have such a minimal impact on performance, Upto 60,000 and beyond of all different colliders were causing no noticable effect on the frame time (<3ms)

所以我尝试去测试动态碰撞体,这会更加有挑战性。
So I tried testing dynamic colliders instead, much more challenging.

要记住这只是物理部分,你的渲染部分的瓶颈只能达到2500个独立模型物体。
Remember this is just physics, your renderer would bottleneck way before reaching 2500 individual objects.

数据

Collider Count500100015002500Unit
Capsule2.15.616.1459-481ms
Box2.65.820.5490-520
Sphere22.94.8190-233

结论

看到了吧?通过这些数据,我们能发现,capsule collider性能要稍稍优越于 box collider ,但是sphere collider的性能明显要甩掉所有人九条街。
So there you have it, across the board capsule actually beats box but not by a huge amount, and sphere obviously kicks everyones ass.

引用

原文
译文

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值