赞
踩
首先有一个官方的说法:静态Colider请不要移动,否则会引起物理引擎啥啥啥重置,消耗性能。
然后面板上毫无疑问是有colider的,而且可以肯定的是面板总是存在移动。那么就加上刚体,第二个问题来了,大量的刚体导致物理引擎计算时间过长。
但我纳闷,刚体都是不动的,为啥会如此耗时呢?请教了下外国友人,如下:
If you need the colliders just as raycast hit object do this:
Make sure they are set to isTrigger
Create a new layer for the objects and put them all on this layer
Go to Edit -> project settings -> Physics and disable all interactions in the collision matrix. So just clear the row and column of your layer in the matrix.
When raycasting against them make sure you use the layermask and pass a layermask that only contains the layers you want to raycast against.
看了下似乎是渲染同步引起的,但渲染方面似乎没
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。