1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculating Y Angle

  1. Dec 8, 2008 #1
    1. The problem statement, all variables and given/known data

    Hi All,

    I have this code for my Games Project to calculate the Projectile maths for an arrow

    mPosition.y = ((pmVolYint * pmTime) + (pmAcc * (pmTime * pmTime) ) / 2) + 18 * sin(pmFAngle*(PI/180));
    mPosition.x = ((pmVolYint * pmTime) +
    ((0.065* pmWind * pmArea) * (pmTime * pmTime) ) / 2) + 18 * cos(pmFAngle*(PI/180));

    mVelocity.z = 0.065 * pmWind * pmArea * pmTime + pmVol;
    pmTime += pmTimeInc;

    What I would lik to do is calculate the new Y (Up/Down) roation produced over time pmTime.

    2. Relevant equations

    I dont have any :blushing:

    3. The attempt at a solution

    mRotation.y = 18 * sin(pmFAngle*(PI/180));


    mRotation.z = (pmAcc * (pmTime * pmTime) ) / 2) + 18 * sin(pmFAngle*(PI/180));

    Please do help and any help is greatly appriecated.

  2. jcsd
  3. Dec 9, 2008 #2
    This isnt a home question..I just put it in here because its so basic..but in order to get my arrow to tilt as it moves I really need its new Angle..someone help!
  4. Dec 9, 2008 #3
    Is there something wrong in my post?

    I have to get the behavoir of my game right by 3pm Thursday and I still have to do the documentation!

    Please help me out on this :uhh:
  5. Dec 9, 2008 #4


    User Avatar
    Homework Helper

    I don't think many people here want to try to interpret computer code. Sorry.
  6. Dec 10, 2008 #5
    oh, its same as a maths equation, i think. I'll change it :)

    T= Time traveled
    W = Wind
    A = Area
    F = Flight Angle
    V= Volicity of Y
    G = is the gravity
    PI = pie
    Y = ((V_{0} T) + (G(T^{2}) ) / 2) + 18sin(F(PI/180))

    T= Time traveled
    W = Wind
    A = Area
    F = Flight Angle
    V= Volicity of Y
    PI = pie

    X = ((V_{0} T) +
    ((0.065 W A)(T^{2}) / 2) + 18cos(F(PI/180));

    Ok, so yeah, how will i calculate the new X and Y angle as the arrow is flow over time?
  7. Dec 10, 2008 #6


    User Avatar
    Homework Helper

    I'm sorry. I still don't follow.

    From your overall setup, I would assume:
    - "time travelled" is like the number of ticks on a clock that occur after the arrow is shot.
    - "volicity of y" is velocity in y-direction?
    - "gravity" is the acceleration due to gravity (i.e. 9.8 m/s^2)
    - "pie" is [itex]\pi[/itex], the ratio of circumference to diamater of a circle (and actually spelt as "PI", :>)
    Does this look correct?

    Please explain what you mean by:
    - "wind" (is this a force or pressure?)
    - "area" (area of what?)
    - "flight angle" (I have no idea)
    - "X" and "Y" - they look like Cartesian coordinates, but you are calling them angles ...?

    The first part of the expressions for X and Y look like ordinary kinematic equations, but I don't understand the trig parts.
  8. Dec 10, 2008 #7
    Sorry, X and Y are indeed Cartesian coordinates.

    wind and area are not a factor.

    flight angle, is the inital Y angle.

    I would know less then you about the equations used here, i ripped it off an example i found. :shy:

    at the moment I am calculating the maxhight of the arrow and after it reachers that, i negate the current Y angle.

    cheap hack, but yeah has the same effect in the end, however i wud rather have it more dynamic :)
  9. Dec 12, 2008 #8


    User Avatar
    Homework Helper

    Then why did you put them in your equations? We either need to understand what you mean by "A" and "W" (mmm, root beer), or you need to try some different equations.

    What is a "Y angle"?

    Huh? What effect? More dynamic than what? I should tell you that I still have no idea what we're talking about.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Calculating Y Angle
  1. Angle Calculation (Replies: 4)

  2. Angle Formed on y-axis (Replies: 1)