+ Reply to Thread
Results 1 to 6 of 6

Thread: -Request- Forward position

  1. #1
    Wire Noob Fatallight's Avatar
    Join Date
    Feb 2008
    Posts
    2

    Default

    I cannot for the life of me figure out how to create an expression gate that outputs the X, Y, Z coordinates of a position 15000 units in front of the entity. Any help would be appreciated.

  2. #2
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    DIY
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  3. #3
    Wire Noob Fatallight's Avatar
    Join Date
    Feb 2008
    Posts
    2

    Default

    Well this was my attempt... but it always seems to point to pretty much the same place which is not in front of the missle launcher...

    <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-spacere;overflow:auto'>N@Missle Control
    I@Pitch Yaw Fire
    O@X Y Z Launch Lock Latch
    Fire == 0 -> Lock = 0, Launch = 0;
    Fire == 1 -> X = 150000 * cos(Yaw), Y = 150000 * sin(Yaw), Z = 150000 * sin(Pitch), Lock = 1, Launch = 1;</div>

  4. #4
    That furred thing Black Phoenix's Avatar
    Join Date
    Feb 2007
    Location
    Kyiv, Ukraine
    Posts
    3,565

    Default

    I&#39;ll give you full vector solution tomorrow, when I come back.
    I'm a wire-crazy person with a tail.

    Take a daily journey into my brain

    D2K5

  5. #5
    Administrator Tad2020's Avatar
    Join Date
    Feb 2007
    Location
    California, USA
    Posts
    1,498

    Default

    I&#39;m still meaning to vector gates and shit some day.
    "Our death ray doesn't seem to be working. I'm standing right in it, and I'm not dead yet." - Jamie Hyneman
    "Yes, managing the anonymous activity of the entire Internet is a challenge. Shoving the entire universe into a mason jar for use as a personal flashlight would also be a pesky bother." - Karl, BBR

    WIREMOD WILL NOT WORK ON YOUR FACE! BUT IT DOES ON YOUR MOM :shifty:

  6. #6
    Wire Sofaking Shandolum's Avatar
    Join Date
    Apr 2007
    Location
    Europe -> Denmark
    Posts
    887

    Default

    All you need is for the expression to point the right way.
    Code:
    O@X Y Z
    Length = 50000
    Position = vecadd(extpos(),vecsmul(extdirfw(),Length))
    X = vecx(Position)
    Y = vecy(Position)
    Z = vecz(Position)
    Everything can be improved upon. Nothing is Perfect.
    The only way to move forward, is to surpass what has already been done.
    Creator of many things.

+ Reply to Thread

Similar Threads

  1. forward right and up vector
    By 1xinfusion in forum Expression 2 Discussion & Help
    Replies: 5
    Last Post: 03-14-2009, 12:31 PM
  2. Replies: 3
    Last Post: 10-17-2008, 01:40 AM
  3. Warping Forward?
    By thedood in forum Wiremod General Chat
    Replies: 7
    Last Post: 08-23-2007, 04:17 AM
  4. How to get the current Z position of a player?
    By Beer in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 07-25-2007, 01:04 PM
  5. Getting rotation from position
    By MattaU in forum Wiremod General Chat
    Replies: 9
    Last Post: 07-04-2007, 02:05 AM

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
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots