Change the direction of movement in accordance with angle of reflection equal to the angle of incidence

I wanted to try and implement an algorithm for bouncing a sphere off the ground without using physics, but using an actionManager.
I made a test scene.

Is there a built-in way to get the direction of movement of the sphere, and after touching the ground, change the direction in accordance with
angle of reflection equal to the angle of incidence

Well in your code, go is your direction right? so you simply need to reflect that vector with the plane normal

You can build a reflection matrix like this: Babylon.js/math.vector.ts at master · BabylonJS/Babylon.js (github.com)