cocos-engine
cocos-engine copied to clipboard
camera3d.convertToUINode cannot be invoked in start
Cocos Creator version
3.6.1
System information
All
Issue description
the start function might do some preparation. So the calculation might be not accurate.
Relevant error log output
No response
Steps to reproduce
- invoke camera3d.convertToUINode in start and in update
- compare these results
Minimal reproduction project
No response
Forum Links https://forum.cocos.org/t/topic/138254
确实有问题,跟踪了一下发现,在 start 中执行此方法时,相机的矩阵数据不对,当延迟一帧后,相机的矩阵数据正常了
start 阶段中相机的 vp 矩阵

延迟一帧后的 vp 矩阵

因为这里不一样,导致 worldToScreen 计算结果出错。 猜测与相机的初始化有关
Hello, we still have this issue in Cocos Creator 3.8.0
pr: https://github.com/cocos/cocos-engine/pull/18541