How the get the normal vector of a Object 3D?

Hi, i’m trying to fix the Slope Bouncing of a character. I’m shooting an raycast down the character I would want to know the normal vector of the hit object. Is there a way to know the normal ?

Original Post on Discord

by user 632418299711324161

The result of your raycast is an array of intersections. Each intersection contains the hit point as well as the hit normal

Assuming you use this.context.physics.raycast which does a three.js raycast

If you do a collider raycast then there is a extra method which has both the hitpoint and the normal (this.context.physics.engine.raycastWithNormal - i think, just on the phone right now :slightly_smiling_face: )

Thank ou very much @marcel :cactus: : )

by user 632418299711324161