Newbie Unity user and first time poster, hello Unity community!
I have a WoW type camera, where you can move the camera around while it is always focused on one object. Instead of controlling the object directly though, they charge up a hit and release, much like what you would imagine for a mini-golf game.
I would like to allow the user to impart physics onto the ball on only the x and z planes, regardless of whether the camera is looking straight down at the ball from above, from directly under, or anywhere in between.
This is the current code for moving the ball, which allows the ball to be shot into the air.
projectile.velocity = transform.TransformDirection( Vector3(0, 0, power) );
I couldn’t find a similar question already asked after a good while of searching, so thank you in advance!