
一开始用的是子节点的raycast3D,但是场景树的相关操作是不能在子线程调用的,于是改为射线检测查询

但用了射线检测查询后,发现space_state也要在主线程中调用

于是我就写起来线程,并在外部初始化space_state

但发现会报这个错误
E 0:00:01:242 mesh_instance_3d.gd:27 @ cut(): intersect_ray must not be called while the physics space is being stepped.
<C++ 错误> Condition "space->is_stepping()" is true. Returning: false
<C++ 源文件> modules/jolt_physics/spaces/jolt_physics_direct_space_state_3d.cpp:472 @ intersect_ray()
<栈追踪> mesh_instance_3d.gd:27 @ cut()
mesh_instance_3d.gd:91 @ a()
我无能为力啦,这个物理空间在步进中要怎么搞啊?有谁会吗?可以教教我吗?谢谢

