leocad
leocad copied to clipboard
FPS controls
I was wondering if you could implement (optional) FPS-style movement commands. FPS means "first-person shooter", which is a genre of video game.
These type of controls are divided into two things:
- WASD controls: you move the camera/person forward, back and laterally using the W, A, S, D keys
- mouselook: you aim the camera using the mouse, as if you were standing still or walking and aiming a gun
You already allow users to bind the WASD keys to movement, which is great! But the camera continues to "orbit" a point in space, instead of "pointing" in a direction. Further, aiming the camera up and down should be independent of movement. I mean, you should keep moving levelly, even if you are aiming up or down.
Do you understand what I am trying to explain? Thanks!
This could get confusing for users if the mouse were so free. There is a mode to allow rotation on one-or-more axis already, I think if you place a camera, you are able to alter the registration-point for movement as you describe.
"There is a mode to allow rotation on one-or-more axis already" Pleas elaborate on this. What mode is it?
Sure thing, so for bricks this different than to viewport. I'll show viewport here
All I've done is placed a brick, split the viewports so I've got perspective, top, and a side view (it doesn't matter which side). Once that is done place a camera and set that up as a viewport. Then use the "rotate-view" which has it's tooltip showing. There will be a circle with four boxes showing.
- The two on the left and right rotate fixed around the vertical axis.
- The two at the top and bottom rotate fixed around the central horizontal axis
- Going on the circle rotates around the depth axis (which I find strange)
Anywhere in the center is free, multi-axis rotation.
As I mentioned, it doesn't follow the mouse, because what would happen to the other viewports if it did?
Instead, you use the controls in the viewport you are in. An interesting thing about using it in the camera viewport is that it allows you to set a relative rotation-point (from the target, not the camera itself)
Hope this helps.
I did not know about the camera object. Thanks! But, still, I would like to (optionally) see the up and down camera rotation detached from movement direction, like in a video game.
LeoCAD is not a game. Is it really necessary to have FPS-like behavior?
@j6t nobody wants it to be a video-game, the question is entirely about a control-style, supporting keyboard with forward, backward, strafe left and right, and rotation using the keyboard. It would be an accessibility win IMO, but it is also not easy. I did a spike back when I posted this. Probably should try another.
PS: The free camera rotation, was something I did not look into. I'm not sure how confusing that could be.
When building a model of a car you likely wouldn't want to use this. But it could be useful for adding internal details to a large and complex building for instance. Or a broad sprawling area where the vertical axis is not very important.
or when working on very complex mecha models
Would this perhaps be a duplicate of https://github.com/leozide/leocad/issues/443?
@hendursaga #443 would be a duplicate of this wouldn't it, as 443 is a higher number than 165... Not sure where that was going.
This is not Solidworks. Is there more to this than the image also embedded elsewhere? Perhaps some text about the screengrab might communicate some internal detail?
FPS does not rotate the world, it rotates a specific camera looking at the world. LeoCad is not an FPS. It could be nice to have keyboard controls; but I agree with @j6t that this is not a game. Or solidworks or the other software mentioned on #368
This is not Solidworks. Is there more to this than the image also embedded elsewhere? Perhaps some text about the screengrab might communicate some internal detail?
FPS does not rotate the world, it rotates a specific camera looking at the world. LeoCad is not an FPS. It could be nice to have keyboard controls; but I agree with @j6t that this is not a game. Or solidworks or the other software mentioned on #368
was merely referncing existing instances of a similar implementation to what the OP requested.
technicalities are beyond me...
would be nice to have though
Right, but can you provide details of what it is you like about the software. You're asking for a lot, and giving very little detail.
I Assume there is more detail in your head than this picture of what you are looking for.
Some of the things you have described are entirely separate to this issue. I'm just trying to get you to communicate those details; and consider if they should be in a different place.
Right, but can you provide details of what it is you like about the software. You're asking for a lot, and giving very little detail.
I Assume there is more detail in your head than this picture of what you are looking for.
Some of the things you have described are entirely separate to this issue. I'm just trying to get you to communicate those details; and consider if they should be in a different place.
well, again referencing ldview as I've had my fair share of experience with it regarding model viewing and analysis:
keyboard arrow keys are mapped in such way that the model is always the center focus of the main camea and pressing right, turns the the camera right, while keeping the model centered (giving a turntable effect of sorts) and etc with all other direction arrows...
If you already use Leocad, no harm installing LDview as you probably have your LDraw library already setu up...test it out quickly, you'll understand...