Roll a ball based on camera direction

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By trafel
:warning: Old Version Published before Godot 3 was released.

Hi. I have a ball that moves arround with wasd and a camera that follows the ball in a third person perspective. I can move the camera around using the mouse. How can apply a force to the ball to where the camera is pointing to ?

enter image description here

:bust_in_silhouette: Reply From: avencherus

Cast a ray from the camera’s center, get it’s normal. Use the normal to multiply by some speed value.