Better movement and camera controls


Since High Fidelity is in still in alpha stage, a lot of things are missing or not working as expected. Among them however, there’s just one that bothers me specifically and makes HIFI difficult to use: The default avatar and camera controls.

The builtin movement is difficult to say the least: If you press the W key to move forward, the avatar moves very slowly at first… if you hold it down for about 5 seconds however, it suddenly starts moving very fast. This doesn’t when you’re walking, but walk physics only work in a select few areas. Switching between first and third person mode is also a bit overhand, and you can’t zoom in and out with the mouse wheel either. You also can’t focus and zoom in on other objects easily. Lastly, you have to hold down the right mouse button while in 1st person mode to look around, with no way to automatically use the mouse to turn the camera.

As some might tell, I’m looking for a way to get the same controls as in Second Life. I wanted to know if there are any scripts or any code changes in progress, that implement conventional movement. What I’m specifically interested in is:

  • W and S should make you walk back and forth… A and D should make you strafe left and right when in mouselook mode, turn left and right when not… E and C should move you up and down when flying. WASD seems to already work like this with the builtin keyboard controls, but not move.js.

  • Have the mouse wheel zoom from / toward the avatar, as well as switch between 1st person and 3rd person view in the process. 1st person mode should be activated when reaching the maximum zoom level (wheel up). When zooming out (wheel down) you automatically exit into 3rd person view, and the wheel controls how far or near the camera floats behind the avatar. Currently you can only switch between 1st and 3rd person from the menu, and there’s not even a shortcut… this is very overhand.

  • An easier way to switch between cursor mode and mouse look mode, preferably independent of which view you are in (1st or 3rd person). For now you are always in cursor mode by default, and to enter mouse look you must hold down the right mouse button… whereas even then, looking around is jittery and the mouse cursor doesn’t get hidden which is incommoding. Like most people, I’m used to having the mouse control the view without holding any buttons, and the cursor being replaced with a discrete crosshair in the center of the screen (so you can see what objects you click on). Perhaps a key can do the toggling, which can be assigned to a special mouse button?

  • In Second Life, you could control + alt + left-click on any spot in the world to focus the camera on that point, then move the mouse to rotate around it. If the avatar would move however, the camera would jump back into 3rd person perspective. Could something like this be implemented in High Fidelity as well? Currently it seems that the camera can only be focused on other objects when selecting them while editing.

  • High Fidelity already seems to support a walk mode and a fly mode. Walking however doesn’t work on most domains, and you can only float around like a ghost. Apparently you can walk on voxels and be blocked by voxel walls, but you cannot walk on meshes and you clip through them while flying. I know that mesh collisions are planned, and it’s among the things I’m most eager to see implemented next… most domains are difficult to explore and enjoy because you cannot walk on the ground.


I went through this same bit of shock but also realized that there is no universal standard with respect to movement or camera controls. There is the SL-style I am used to, but there is also the WoW way, he Maya way, the Blender way, etc. Similar issues exist for the camera. The tension here is that there are very different use cases to support. Someone used to modeling with Maya will want to continue using the scene movement and camera movement controls they are used to. You and I would be far more comfortable using the WASD / arrow key movements of SL-style grids.

What I have seen here is that the architecture of HF expresses extensibility. That means many things that would be hard baked into a viewer (that which is called “Interface” here) are left open for dynamic implementation via JavaScript extensions. Now that makes a lot of sense to me because experience creating designers may want to express different modalities of movement, looking, and interactions.

This applies to gravity too. When you enter a nascent domain, there is no gravity. Gravity is up to the designer. This is why you are floating around. You will see some domain have created a planar gravity field by adding invisible thin boxes then turning on the gravity property in them.

Likewise, there are no hard baked collision hulls, though in this case that issue is more that the VHACD code is dismally slow (I messed with Khalid’s code in another grid, required lots of caching of pre-created shapes). What this means is that the process of establishing a collision surface is going to be a manual process, or perhaps, an iterated automated one.

I am working on a better camera controls script, though it is taking me longer than I hoped (am new to the HF experience, so I have to learn the class methods), but my intent is to offer a list of camera control modalities to the script, since I now know people do want to use their favorite means.


With inspect.js running you can Alt-click on an object (works best with smallish objects) and move the mouse to zoom and orbit, and hold down Ctrl as well to orbit over. You used to be able to hold down Alt + Ctrl + Shift to pan but I just tried this now and it’s been broken somewhere recently. Grrr



I’m actually in the process of reworking the controller management system right now and I’m hoping it will help with some of these issues. Perhaps most importantly, it’ll expose the input mappings to javascript, which will enable you to change the controls around to whatever you want and even adjust their sensitivities! Eventually we’ll have a nice key mapping window that you can bring up, too.

For example, with the new system, you’ll be able to adjust your movement speed and camera rotation sensitivity, switch between cursor and mouse look modes, and add new key mappings as desired. It’ll be controller agnostic, so all this stuff will work with gamepads and hydras, too, without any additional scripts.

The scripting and gamepad stuff is actually mostly done with the hydra support soon to come, and it should all be integrated pretty soon. Let me know if there’s any other functionality you’re looking for once it’s added!

  • Sam (Hifi Intern)

P.S. Also you should be able to switch between 1st and 3rd person with “p”


Apparently some of the features I was looking for are now in latest GIT master:

  • The mouse wheel can be used to zoom in and out in third person mode, and automatically enters first person when you’re close enough! Only critique would be the lack of smooth scrolling, but that’s of course less urgent and more eye candy related.

  • There’s now a mouse look mode that doesn’t require you to hold down a button. It can be turned on from the menu (apparently the Shift + M shortcut doesn’t work) and it even supports smoothing by default. It is however complicated to toggle.

Alt + Left-Click dragging doesn’t seem to work, even with inspect.js running. I tried it on random objects in a domain but nothing happens. It’s good to know that the feature is there however! I’ll wait for the future improvements mentioned above otherwise… thanks for looking into this!

Also, I have one more suggestion: Can the camera pivot around your avatar in 3rd person mode? It’s a bit weird that the camera rotates at the position of the view, rather than being focused on the character’s body. Of course this is the correct behavior in 1st person view, but I find it weird in 3rd and it’s not a standard model I believe.


Smoother zooming is on my todo list and I’ll take a look at the mouseLook shortcut not working.

inspect.js seems to be working for me in all 3 modes on Windows, but I’ll test on Mac.

As for camera pivoting around the avatar, try View -> Center Player In View!