Dear all,
I am using a raycast 3d to detect if I am going to a wall.
I want to get the collision normal so that I use getcollisionnormal() function.
However, the function sometimes will give me zero Vector, which is (0, 0, 0)
I call the function in fixedprocess() and it seems it return the right normal vector and zero vector interchangeably like the following:
(0, 0, 0)
(-0.5, 0, -0.866025)
(0, 0, 0)
(-0.5, 0, -0.866025)
(0, 0, 0)
(-0.5, 0, -0.866025)
but sometimes it do give me the normal vector continuously like the following:
(-0.5, 0, -0.866025)
(-0.5, 0, -0.866025)
(-0.5, 0, -0.866025)
(-0.5, 0, -0.866025)
(-0.5, 0, -0.866025)
How can I solve the zero vector problem?
Thank you.