Comments (1)
-
I fixed the issue of first mouse wheel not working for zoom, along with a bigger rework of walk/fly handling: 38380d6
-
As for your own applications:
Inputs are configurable in CGE, you can change them in your own applications, using e.g.:
MyWalkNavigation.ZoomEnabled := false; // this is already default in CGE MyWalkNavigation.Input_UpRotate.Assign(keyNone, keyNone, '', false, buttonLeft, mwUp); MyWalkNavigation.Input_DownRotate.Assign(keyNone, keyNone, '', false, buttonLeft, mwDown);
or (simpler, if you don't care about initializing all input fields and want to just add mouse wheel):
MyWalkNavigation.ZoomEnabled := false; // this is already default in CGE MyWalkNavigation.Input_UpRotate.MouseWheel := mwUp; MyWalkNavigation.Input_DownRotate.MouseWheel := mwDown;
I tested above, and we had a bug (assigning mouse wheel to Input_UpRotate/Input_DownRotate didn't work), it is now fixed in castle-engine/castle-engine@6ff413b . So above examples really work :)
-
As for what is best for view3dscene, CGE editor, and engine defaults:
I did give it quite some thought, and I don't consider mouse wheel as a good choice (by default) to look up / down.
Mouse wheel should 1. do zoom (yes -- this is practically the same as walking forward / backward in fly mode), 2. or change move speed, when in MouseLook mode.
This applies to both CGE editor and in view3dscene, as I want them to be consistent for users. And my recent changes make them more consistent, e.g. mouse look is now easily available in view3dscene if you hold Right mouse button, just like in CGE editor, and mouse wheel then changes speed.
This treatment of mouse wheel is:
-
Intuitive to users. I did test CGE editor on other people, including professional 3D people :) Conclusions: Mouse wheel should really do a zoom, regardless of mode (examine or walk), this is intuitively expected by people.
-
Consistent with other software. Godot, Unity, Gestaltor, Blender are examples of software I look upon closely. It's not a perfect correspondence of course (e.g. Blender has a special "fly mode" activated by Shift+~ instead of right click), but I believe people can see it is "analogous when it makes sense". They all use mouse wheel as described above (zoom, or change speed in mouse look mode e.g. when you hold right mouse button).
-
Personally, I also think it's not comfortable to look up / down with mouse wheel (or some keys) anymore. I had a different point of view long time ago, when mouse was not always guaranteed, and you needed to provide some keys to look up / down. Nowadays, when everyone has mouse, mouse look is really a superior way to look around in 3D.
For games, we provide by default a rather "conservative" input shortcuts, to not be surprising (so e.g. AWSD work by default, but not much more, with TCastleWalkNavigation) and encourage developers to activate mouse look to navigation on desktop (examples/fps_game, examples/physics/physics_explosion, examples/physics/physics_3d_shooter, ...).
-
These are the current shortcuts in view3dscene:
from view3dscene.
Related Issues (20)
- tovrmlx3d: glTF does not convert to X3D with tovrmlx3d and neither does .bin. I'm just interested in X3D at this point. HOT 1
- Converting X3D to VRML HOT 3
- Exception "EAccessViolation": Access violation HOT 5
- Support glTF/glb PBR Next (glTF 2.0 Extensions) included in IridescentDishWithOlives
- Errors when reading simple Wavefront Object file (.obj+.mtl) HOT 2
- Compilation from sources instructions do not work. HOT 12
- wrong path to include files HOT 1
- tovrmlx3d hangs on conversion HOT 2
- Exporting to formats more commonly used in CAD programs HOT 1
- Multiple Problems with latest View3DScene HOT 2
- Examine: scale/rotate produce odd results HOT 12
- Cannot click buttons on macOS Retina screen HOT 4
- Make sure description fields from X3D4 are implemented in view3dscene (accessibility)
- HAnimDisplacer posted to wrong repo: HOT 2
- PhysicalMaterial works with 2D PixelTexture but not with PixelTexture3D HOT 1
- VRML/X3D-parser does *not* report errors anymore HOT 4
- "Clipboard -> Print Current Camera" output is incomplete HOT 3
- Conversion vrml->x3d and vice versa: nasty decimal point/comma problem! HOT 10
- [FYI] turning phong shading off (also persists after putting back on) in water examples makes go mouve. (channel swap?) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from view3dscene.