Results 1 to 8 of 8

Thread: Some crazy math

  1. #1
    Intellektueller Bastinka's Avatar
    Join Date
    Feb 2007
    Location
    Berlin, Deutschland
    Posts
    2,643

    Post Some crazy math

    Been messing around with Expression 2 Chips (Garrysmod)

    I'm not a math wiz, or anything of the sort, but has anyone got the slightest clue of how I would calculate and objects landing location (if it's in the air) using some crazy math?

    I'd imagine I'd have to use it's inertia, mass, velocity, bearing, elevation, direction and position. All I would want to know is when it's position vector his ~0 on the Z axis, where it would be (Before it lands).


    Example: I stick the chip on a prop in Garrysmod, then throw it in the air with my physgun.
    Reply With Quote

  2. #2

    Re: Some crazy math

    Hey Silent, for future reference, post Garry's Mod related threads here:

    http://www.modacity.net/forums/forumdisplay.php?f=57

    Anyway, your question could be solved using GPS (Which is in the E2 chip already)

    Shouldnt be that difficult
    Reply With Quote

  3. #3
    Shoe Shining Peon RedBaron's Avatar
    Join Date
    Jul 2007
    Location
    United States of 'merica
    Posts
    603

    Re: Some crazy math

    X = X0 + 1/2(V0 + V)t

    Where:
    X = final position
    X0 = initial position
    V = final velocity
    V0 = initial velocity
    t = elapsed time

    Relative to only one frame of reference, you'll have to break 3D vectors into its individual components, use those values, then recompile the final vectors. This disregards friction, which will require a whole different set of equations. You're probably better off not doing it manually.
    Reply With Quote

  4. #4
    Senior Membe Syuusuke's Avatar
    Join Date
    Sep 2006
    Location
    Location
    Posts
    3,868

    Re: Some crazy math

    Basically physics.

    E: Yes, what Delta said, but wouldn't you have to account for the angle you launched your doohicky? (I'm assuming you're not shooting it off..oh say straight off a cliff or something)
    Reply With Quote

  5. #5
    A Loose Screw Phopojijo's Avatar
    Join Date
    Dec 2006
    Location
    Ontario, Canada
    Posts
    2,749

    Re: Some crazy math

    Yeah, Inertia and Bearing don't belong on that list... elevation either if you consider position to be 3-dimensional.
    Reply With Quote

  6. #6
    Shoe Shining Peon RedBaron's Avatar
    Join Date
    Jul 2007
    Location
    United States of 'merica
    Posts
    603

    Re: Some crazy math

    Quote Originally Posted by Syuusuke View Post
    Basically physics.

    E: Yes, what Delta said, but wouldn't you have to account for the angle you launched your doohicky? (I'm assuming you're not shooting it off..oh say straight off a cliff or something)
    Initial angle of the vector falls under finding the individual components (via your basic trigonometry), so yes.
    Reply With Quote

  7. #7
    Intellektueller Bastinka's Avatar
    Join Date
    Feb 2007
    Location
    Berlin, Deutschland
    Posts
    2,643

    Re: Some crazy math

    The way you did it delta, I would need to know what the ending velocity and starting is. That isn't what I'm trying to do. I need to calculate an objects landing position relative to its current position, acceleration and whatnot.

    I got my answer on another forum: http://www.wiremod.com/forum/help-su...-position.html

    Thanks though!
    Last edited by Bastinka; July 20th, 2009 at 09:22 AM.
    Reply With Quote

  8. #8
    Could've Moved Mountains
    Join Date
    Sep 2006
    Location
    RIT
    Posts
    3,144

    Re: Some crazy math

    Reply With Quote

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •