Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以当你用射线击中一个物体时,你为什么要抓住一个物体的 id 并用那个 id 确定它的材料,而你可以直接抓住一个材料而不是(这也更快)?
我能看到的唯一原因是,如果一个对象的东西比材料多,但在这种情况下,我还是宁愿传递那一堆而不是对象ID。