galacean / engine

A typescript interactive engine, support 2D, 3D, animation, physics, built on WebGL and glTF.
https://www.galacean.com/engine
MIT License
4.29k stars 307 forks source link

Raycast 命中的 hit 数据里返回 shapeId #2003

Closed ch-daisy closed 9 months ago

ch-daisy commented 9 months ago

公益之城有一个raycast的需求,体素模型的包围盒是创建的collidershape,塞到了一个colloder里面,点击的时候希望能把命中的collidershape的id 返回,用来删除体素模型的collidershape Collider 最好能顺便加一下 removeShapeById

luzhuang commented 9 months ago

我直接给你返回shape 你调用removeShape是不是也可以 @ch-daisy

luzhuang commented 9 months ago

https://github.com/galacean/runtime/pull/2004