playMaker

Author Topic: RayCast Hit Normal not working correctly (SOLVED)  (Read 839 times)

Stain Corb

  • Junior Playmaker
  • **
  • Posts: 69
RayCast Hit Normal not working correctly (SOLVED)
« on: February 04, 2020, 02:54:32 PM »
Hi all, I am trying to make an NPC that can evade object intelligently, Basically what I want is for the NPCs Raycast to get the object it is running into, its Normals and depending on orientation NPC will dodge Left or Right depending on normals.

The problem I have is.

1-Normals are changing randomly when Raycast is not touching anything.

2-Is there a Vector3 to Float?, I am using Vector3 to String, but then I have to convert to float, something direct would be better.

3-Any recommendation on how I can get normal coordinates correctly?.

Link to video showing error:
« Last Edit: February 04, 2020, 07:48:24 PM by Stain Corb »

Stain Corb

  • Junior Playmaker
  • **
  • Posts: 69
Re: RayCast Hit Normal not working correctly (Solved)
« Reply #1 on: February 04, 2020, 05:23:11 PM »
RayCast was global and conflicting, I remade it Local and now its not giving me strange results.