Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change camera settings #2

Closed
alessiogambi opened this issue Jun 30, 2018 · 3 comments
Closed

Change camera settings #2

alessiogambi opened this issue Jun 30, 2018 · 3 comments

Comments

@alessiogambi
Copy link
Contributor

A programmatic way to configure how to grab the frames from BeamNG (camera position, FOV, etc) would be ideal.

@tdev
Copy link
Member

tdev commented Jun 30, 2018

for example in the Lua code:

      core_camera.setByName(0, "relative")
      core_camera.proxy_Player('setupRelative',
        vec3(0, 0, 1), -- pos
        vec3(0, 0, 0), -- euler rotation
        90 -- FOV
      )

@alessiogambi
Copy link
Contributor Author

I updated the Lua file inside the scenario as follows, and got what I needed:

     core_camera.setByName(0, "relative")
     core_camera.proxy_Player('setupRelative',
        vec3(-0.5, 2, 0.5), -- pos: more or less in front of the car, on the driver side, slightly above the ground
        vec3(180, 0, 180), -- euler rotation: somehow the default camera is facing backward and flipped upside down
        90 -- FOV
      )

@Palculator
Copy link
Contributor

Added a relative_camera method to set up a camera realtive to the vehicle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants