I am not sure if things worked differently then, but I forked the example and added two cubes, the left cube is rotated in the editor and returns correct normals according to the preset rotation. The middle cube is not rotated and comes from the original example. The right cube sets its rotation after a 100ms delay. This cube does not return the correct normals, but the ones according to the rotation set at the init of the project (which are zero). Project below:
What’s going on? Am I missing something, how can I raycast a normal which is being rotated in runtime? I can work with an extended function of the ‘setMat4Forward’ function if anyone knows how to include current rotation.
Thanks in advance
Solution: Don’t set your object to static, it will only update the visual side of things. When set to kinematic you can rotate in runtime and raycast to return correct normals.