+ Reply to Thread
Results 1 to 2 of 2

Thread: Hover platform troubles

  1. #1
    Wire Noob Qanael's Avatar
    Join Date
    Feb 2008
    Posts
    17

    Default Hover platform troubles

    I have a little thruster-powered platform, controlled by an E2 chip which receives the required position and angle. Now, the hovering is nice and smooth, until the yaw gets to 180 degrees. Then my precise little platform becomes a ballet dancer.

    I tried to fix it by turning the angles into a 0-360 range instead of -180 to 180, but now the problem is at 0 degrees. Here's the code snippet:

    Code:
    TYaw = Mul*2*(2*(ReqAngle:yaw() - Yaw) - 10*angnorm($Yaw))
    I've been thinking maybe I could use the sine of the angle difference to power the thruster, but I'm not so sure that would work.

    EDIT: It did work. It's kinda slow and the last degree or so takes forever, but it works.
    Last edited by Qanael; 01-05-2009 at 01:16 PM.

  2. #2
    Wire Tutor chinoto's Avatar
    Join Date
    Apr 2008
    Location
    Brooklyn Park, MN. Lost my thumbdrive yet again...
    Posts
    1,983

    Default Re: Hover platform troubles

    Your code seems randomly thrown together, so I'll just redo the whole thing. (It would be helpful if you gave all the code)
    Code:
    TYaw=angnorm(ReqAngle:yaw()-entity():angles():yaw)-entity():angVel():yaw()
    If the thrust multiplier is too high then it will spaz out, I recommend dividing entity():angVel():yaw() by whatever your thrust multiplier is.
    (\__/) Expression 2 Resources: E2 Beginner's Guide | E2 Formatting Guide | E2 Function Reference | E2 Examples | Me
    (='.'=) PM me code and I'll send it back optimized if possible. (I find it fun dammit!)
    (")_(") Drunkie referring to an E2: "It's obvious that Chinoto made this, his coding style is all over it."

+ Reply to Thread

Similar Threads

  1. Floating Hover Platform - Just a question
    By rhx123 in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 03-14-2009, 07:44 PM
  2. Replies: 11
    Last Post: 06-01-2008, 05:21 AM
  3. Wire Thruster Only Hover Platform
    By daedalus in forum Gate Nostalgia (Old School Wiring) Discussion & Help
    Replies: 7
    Last Post: 11-12-2007, 09:02 AM
  4. Wired hover Platform expressiongate help! no hoverballs
    By Jerethi50 in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 08-07-2007, 01:29 AM
  5. Hover Platform Thingy
    By Nophysicalbody in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 05-03-2007, 03:57 PM

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