Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Basketball game shooting

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?


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact