- Home /
Sphercast hitinfo TextureCoord rounded?
Hi guys, I'm using a Spherecast to get the TextureCoord of the Hitinfo, but I have realized the float values of the Coord is rounded to 1 decimal place. e.g. 0.1,0.3
But it's working fine for raycast.
Is this a bug or is there something I'm missing?
Thanks in advance.
Answer by AtGfx · Jun 26, 2017 at 02:56 PM
Hi !
It's only the debugger that rounds your float to only one decimal. You can use Debug.Log (point.ToString ("F4")) if you want 4 decimal for example. You can use any value you want ;)
Hi, thanks for your reply,
But unfortunately your answer is not correct. (There are no problems with displaying the float values in the console etc.) RaycastHit returns rounded values for textureCoord when using SphereCast...
Again, as I have mentionend, when using Raycast ins$$anonymous$$d of spherecast the float values are correct....
Your answer
Follow this Question
Related Questions
RaycastHit.textureCoord ranges from (0,0) to (1,1) for each face. 2 Answers
Why in Unity3D RaycastHit. textureCoord always return 0,0 after building the project? 1 Answer
Why does my Mesh Collider RayCastHit only return a texturecoord on Unity Remote? 0 Answers