User Tag List

Results 1 to 4 of 4

Thread: Trignonotery question

  1. #1
    Clicker Multimedia Fusion 2

    Join Date
    Nov 2009
    Location
    center valley, PA
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Trignonotery question

    Hello,

    I'm trying to make an iron-sights style sniper game. So far, I have two cross hairs, one in front and one in the back. The front cross hair follows the mouse, while the back cross hair follows a path set by the front cross hair. Now, to make this game more interesting and realistic, I'm trying to build an engine where the actually sniper point is at a difference after the two cross hairs. Ive got most of this figured out, but I need some help with the math involved. If it helps, ill post some pictures:

    http://imageshack.us/photo/my-images/233/explination.png/

    and here is the MFA, if it helps:
    http://mfa.aquadasoft.com/view/1318631609-white_death

    Thanks for your help,
    nick

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trignonotery question

    Set the solid black one to:

    X : Cos(Atan2(Y("back-sight")-Y("front-sight"), X("front-sight")-X("back-sight")))*Distance("Advanced Direction Object", X("back-sight"), Y("back-sight"), X("front-sight"), Y("front-sight"))*2 + X("back-sight")

    Y : 0-Sin(Atan2(Y("back-sight")-Y("front-sight"), X("front-sight")-X("back-sight")))*Distance("Advanced Direction Object", X("back-sight"), Y("back-sight"), X("front-sight"), Y("front-sight"))*2 + Y("back-sight")

  3. #3
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trignonotery question

    X = 2*X("Back Sight")-X("Front Sight")
    Y = 2*Y("Back Sight")-Y("Front Sight")

    * Jacob hides

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Nov 2009
    Location
    center valley, PA
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Trignonotery question

    Thanks so much, this is exactly what I was looking for. I might use this MFA later for a iron-sights game tutorial.

Posting Permissions

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