fintelia / terra

A large scale terrain rendering library written in Rust
Apache License 2.0
504 stars 14 forks source link

More fine grained camera control #24

Closed PureTryOut closed 2 years ago

PureTryOut commented 2 years ago

I expected to be able to look around by moving my mouse around, but sadly this isn't possible. I connected a gamepad (Dualshock 3), which worked out of the box which was awesome, and couldn't look around using the right joystick either. Also moving around is really quick on high heights with seemingly no way to slow down.

Could these things be changed to allow more control over the camera by any chance? It's hard to find any place I would recognize just by height right now as I just fly right past them and have no way to turn my camera easily :sweat_smile:

fintelia commented 2 years ago

I really should get around to making better camera controls :smile:. You can control the starting position by passing command line arguments: including the coordinates expressed as a plus code, a heading (in degrees), and an elevation (in meters). But that really isn't quite the same...

It should be too hard. All the camera controls are currently done by: https://github.com/fintelia/terra/blob/cb7d195ae09a365c526a5c56a0143fe1a13e37c4/bin/preview.rs#L201-L220 and https://github.com/fintelia/terra/blob/cb7d195ae09a365c526a5c56a0143fe1a13e37c4/bin/preview.rs#L267-L288