 spicymilk Registered User |
Quote
|
2023-05-24 03:44:29 |
|
I was wondering (since I'm new to scripting) if say I wanted to shoot a basketball could I have it where the player just lines up the shot and when they shoot it can calculate the right distance from the player to the goal and set the right force?
|
 just_in_case Moderator |
Quote
|
2023-05-24 08:57:46 |
|
yes, it is possible, you need to calculate the distance between the player and the goal position, then normalize the distance and then apply a power factor to it, to determine the force. you can use vector and math to calculate all this.
|
 spicymilk Registered User |
Quote
|
2023-05-24 18:03:40 |
|
so how would I go about doing that? could I modify a script where you already pick it up and throw something then adjust the force?
|