So I’ve done reading an I’m still have somewhat of an Issue. I want to move my player object to the point that is click on the screen. I have everything working for screentoworld, the issue comes when i add a force to the player object. No matter the distance of the click I want the force that is applied to the object to be the same. Right now, if you click close the object the force is not the same as if you clicked as far way possible from the play object. Is there a way to do this? From what I understand,
Question 1
, AddForce takes a Vector3 which tells it the direction to move and the velocity, is that correct? I feel like I read that it was an angle, not a direction soecifically.Question 2
, I normalized it so the direction would remain the same but the Vector velocity would change and make the force a constant force, is that what .normailized does?pHitPoint is the Vector3 that holds the position of where the user clicked.
transform.position is the position of the player, the object we want to add a force to.
rigidbody.AddForce((pHitPoint - transform.position).normalized *
(jumpForce * 2), ForceMode.Impulse);