simlu / voxelshop

This is the official repositiory for VoxelShop
https://blackflux.com/node/11
Apache License 2.0
350 stars 66 forks source link

Free first person camera #249

Open DuendeInexistente opened 7 years ago

DuendeInexistente commented 7 years ago

I get this is intended primarily at designing small things, not actual voxel maps. But would it be hard to add a free first person camer? One that can do more than rotating around the central point? It'd make my life so much easier.

simlu commented 7 years ago

Not hard, but I have limited time atm. Do you know that you can change the central point that the camera moves around? Does that work for you?

Otherwise can you specify your use case a bit more please?

DuendeInexistente commented 7 years ago

Oh, I can change the central point? I haven't found the option to do that. I did find the hotkeys to pan the camera up/down/left/right thought, and those were pretty useful. My use case is mainly wanting to make small maps, similar to models or very, very broad sketches of an area.

simlu commented 7 years ago

Yes, please take a look at the documentation here: https://simlu.github.io/voxelshop/voxelshop_shortcuts.html

Should help you until we get to adding a free camera in!

JohnPablok commented 7 years ago

Hello! @simlu Is there any way I can change how the "middle mouse button" and the "right mouse button" move the camera? I want to rotate the view using right click, and pan the view using middle button, which is the opposite of how it is right now. I don't see any options for that on the Shortcut manager.

simlu commented 7 years ago

There is currently no way to change thar unfortunately.

But basically you want the same camera shortcuts that blender has im guessing? I think that's on the too somewhere.

JohnPablok commented 7 years ago

Yes exactly! That's the setup I use on Blender, it's also very similar to the one in Unity and even Maya (omitting the fact that you have to press Alt there). The switched functionality messes a lot with my muscle memory, I guess it happens to other people too.

simlu commented 7 years ago

Let me take a look

JohnPablok commented 7 years ago

Thank you! By the way, apparently my memory sucks. In Unity you can pan with middle mouse button and rotate the camera with right click, without pressing ALT. Pressing ALT actually rotates with LBM, pans with MMB and zooms with RMB. Maya might be the same.

simlu commented 7 years ago

I did some work here towards customizing mouse / camera actions. Will try to do a QA release shortly...

https://github.com/simlu/voxelshop/pull/250

JohnPablok commented 7 years ago

Wow! Awesome! Thank you so much, I'll be sure to test it as soon as it's released.

simlu commented 7 years ago

Ok, pre-release is up: https://github.com/simlu/voxelshop/releases

JohnPablok commented 7 years ago

Nice! It works beautifully! The only problem I notice is that it isn't possible to rotate the camera using RMB while I'm using the "Draw voxel" tool and the mouse is in the voxel zone, of course this is by design because right click erases voxels, but it might be troublesome in big scenes, doesn't matter though, I can live with that haha. I really want to thank you, this is going to improve my workflow a lot!

Edit: Using the "select" tool also gets very difficult, I can't rotate the camera at all if I'm using it. But what I'm doing right now is changing to another tool, rotating there and coming back to "select"

simlu commented 7 years ago

Doesn't ctrl work to always enable the camera?

JohnPablok commented 7 years ago

Oooh, well that solves it! Awesome, yes, it works.

Edit: I think most 3D software enables the camera with ALT, might be hard for some to find that shortcut.