Previously, this was working well to push the ball forward based on the player’s forward.
var fwd = player1.transform.forward;
football.GetComponent<Rigidbody>().AddForce((fwd* 100 * power_level), ForceMode.Impulse);
Since I added a joystick control, it pushes the ball whichever way the player is running.
So if the player is running left when I push push the button for this code, then the ball is pushed left instead of whichever direction they are actually facing.
It wasn’t doing this when the mouse was the controller instead of the joystick, and it still works correctly when the player is stationary.
So I believe that the ‘fwd’ is taken not from the player’s rotational forward but based on the direction in which the player is running for some reason.
Any ideas on how to get the actual forward based on where the player’s face is looking?
Thanks!