Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Math problem when trying to make an object feel like its been thrown

Author
Message
hookkshot
19
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 4th Feb 2011 03:05
So im my game u use the mouse to point in birdseye view where u want your player to throw stuff at. the problem im having is how do I work out what direction to launch the object with code so it ends up where my target object is??

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
Suicidal Sledder
21
Years of Service
User Offline
Joined: 17th Aug 2004
Location: Tikrit, Iraq
Posted: 4th Feb 2011 03:59
hookkshot
19
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 4th Feb 2011 04:54
ok so basically my game is in topdown view and i want to be able to press the shoot button and launch a ball or something from object to another simulating the effect of it being thrown. What i mean is it goes in the air then slowly decelerates and drops to the object its being thrown at

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
SH4773R
16
Years of Service
User Offline
Joined: 18th Jan 2010
Location: AMERICA!!!
Posted: 4th Feb 2011 09:12
Well correct me if wrong but it seems the most simple way is to increase the y axis position while decreaseing the x axis position, and for more realism add friction with the air.

Login to post a reply

Server time is: 2026-07-18 05:06:25
Your offset time is: 2026-07-18 05:06:25