EditorXR icon indicating copy to clipboard operation
EditorXR copied to clipboard

Permanent tools (e.g. ILocomotor) cannot be overridden

Open leith-bartrich opened this issue 9 years ago • 4 comments

EditorVR.Tools.cs filters all tools that are ILocomotors as being permanent tools.

This is done at line 42 as follows:

bool IsPermanentTool(Type type) { return typeof(ITransformer).IsAssignableFrom(type) || typeof(SelectionTool).IsAssignableFrom(type) || typeof(ILocomotor).IsAssignableFrom(type) || typeof(VacuumTool).IsAssignableFrom(type); }

This is very likely a mistake. You probably meant to explicity filter BlinkLocomotor and your other permanent locomotion tools.

The behavior of the code as you have it above, filters out my tool from showing up on menus, because the system believes all ILocomotor tools are permanent. Which they're not. It's perfectly reasonable for me to create a special locomotion tool that I want to be activated from the menu.

leith-bartrich avatar Jan 21 '17 17:01 leith-bartrich

Thank you for your feedback.

This is not an oversight. You're simply seeing a feature that has not been implemented yet: a Settings menu. The Settings will be where you can set defaults for locomotion or selection or the transform tool. The idea is that all ILocomotors, ITransformers, etc. will be enumerated, so that a user can set their default. These are still permanent tools though as they are not toggled on/off like other tools.

For now, you have a few options. If you want to override all permanent tools to test your locomotion, simply implement IExclusiveMode and drop ILocomotor. Otherwise, I'd say that you're welcome to switch the default locomotion in code to your locomotion class (keeping ILocomotor).

amirebrahimi avatar Jan 23 '17 17:01 amirebrahimi

I have issues with this design choice then. But I'm publishing a larger critique that incorporates the issue. I'll tag it here when I do.

leith-bartrich avatar Jan 23 '17 21:01 leith-bartrich

My larger critique, which includes my concerns on this issue is here. For reference: http://www.fie.us/vr-review-unitys-editorvr-experimental-build/ I'd assume this issue though, is closed. As it's to design.

leith-bartrich avatar Jan 25 '17 00:01 leith-bartrich

Well, not exactly. I saw this as a dialogue initially. I was responding to your initial comments, providing you with some background, and a workaround so you could continue working in the meantime.

IsPermanentTool was added during development to address an issue of default tools getting popped off the stack as you add a custom tool selected from the menu. At the time, we discussed whether other tools created by users would ever need to become permanent and decided it was something we could offer in the future. It's not because the plan is to lock users of EditorVR specifically into our tools. In fact, we did this for our own selfish reasons, too, so we could experiment with different locomotion tools all at once and switch between them without having to remove existing ones. So, the work here moving forward is to figure out the best way to expose that.

Additionally, with locomotion tools, there's the possibility for one or two-handed tools. We haven't yet provided a two-handed tool interface other than you having both controllers specified in your action map. That's something that I believe is already being worked on in a separate branch.

So, you're welcome to share more of your thinking around this. For your other commentary -- I've created #51 where more can be fleshed out there should you wish to fill in more details about what you mean by contexts.

amirebrahimi avatar Jan 26 '17 01:01 amirebrahimi