Unsolved yaw in lua

Discussion in 'Mod Support' started by fillman86, Feb 2, 2024.

  1. fillman86

    fillman86
    Expand Collapse

    Joined:
    Apr 18, 2020
    Messages:
    176
    I often give up on projects that require me to know yaw, or gforces. At the moment I'm trying to use print in a controller to get either of these values in lua, can anyone help? Please keep in mind that I know very little about lua
     
  2. fillman86

    fillman86
    Expand Collapse

    Joined:
    Apr 18, 2020
    Messages:
    176
    I was able to get g forces, but yaw would be a lot more usable. I could calculate yaw if I was to get the vehicle's rotation and somehow compare it to the vehicle's velocity vector... I'm beyond my understanding of lua with this though
     
  3. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,662
    There should be UI elements in-game that present both Yaw and Pitch of the vehicle.

    Perhaps you could check the Yaw in the HTML to see what variable it's reading from as it has to be coming from somewhere else.
     
  4. NiZhaZi

    NiZhaZi
    Expand Collapse

    Joined:
    Apr 1, 2023
    Messages:
    14
    I get roll pitch and yaw by this:
    Code:
        local roll, pitch, yaw = obj:getRollPitchYaw()
        posture.roll = roll
        posture.pitch = pitch
        posture.yaw = yaw
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice