Raised This Month: $ Target: $400
 0% 

X Y Problem Projectile motion


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-22-2021 , 11:51   X Y Problem Projectile motion
Reply With Quote #1

I am trying to code a mortar device to target enemies behind a wall or not behind anything, so far i am failing bad with the calculations...

Knowing the two kinematics formulas that i do need to use they're..

  • Velo (Final) = Velo (Initial) + ( [acceleration or gravity] * time )
  • distance = Velo(Initial) * time + 0.5 * [acceleration or gravity] * tiime ^ 2.0


Here's the code where i am trying to calculate the initial velocity in order for the projectile to bypass the wall or to hit its target.

code



How am i calculating the velocity ( iknow its wrong i had change it many times lol )

opsy


Any help is appreciated !!!

Some other formulas :-
to find the initial speed and/or find the angle!
  • Vi = ( X * g / sin( 2 * angle ) )
  • angle = 0.5 * arcsin ( ( (g * x ) / Vi^2.0 ) )
  • times = X / (Vi * cos (angle))

DEFINITION OF characters :-

Vi = Initial Velocity
X = Distance in the x axis
angle = the angle of the XY Plane
g = Gravity which is 800unit/s^2 for the goldsrc



Similar to my problem
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 05-22-2021 at 12:26.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode