Unsolved Get camera information from vehicle Lua

Discussion in 'Mod Support' started by NickRyge, May 2, 2023.

  1. NickRyge

    NickRyge
    Expand Collapse

    Joined:
    Aug 21, 2013
    Messages:
    20
    Hello!

    I have been looking into getting a camera position and direction vector, just like in the ge_utils, and other ge files, like:

    core_camera.getQuat() * vec3(0,1,0)
    core_camera.getPosition()
    The issue I am facing is that I'd like these two pieces of information to be in the UpdateGFX-function of some vehicle Lua. I have experimented with getting this through obj:queueGameEngineLua but was disappointed to find out that this call does not return a value, but just a nil.

    I am interested in any way I can get camera information from vehicle lua, and I'd love for it not to require 3 billion function calls, as it is intended to run in the UpdateGFX function and shouldn't impact performance.

    I am at a bit of a loss with the documentation, so if there is an easy way to get the information, I'd be your biggest fan if you'd share it.

    Thanks lads.
     
  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