jessepmason Posted July 16, 2015 Share Posted July 16, 2015 Hello, I am experiminting with the Virtual Joysticks Camera and I have a scene that is relatively large. when I use the left joystick to move the camera it moves really slow, I can't figure out how to change the speed of the left joystick. The right joystick(camera rotation) rotates just fine. Thanks for the help! Quote Link to comment Share on other sites More sharing options...
davrous Posted July 17, 2015 Share Posted July 17, 2015 Hi, I've just updated the VirtualJoysticksCamera to support the .speed property. You should now be able to do camera.speed = 4.0 and it should move faster. Please get the last version from our github. Thanks, David Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 17, 2015 Share Posted July 17, 2015 Hi Davrous! Good to see you again! Thanks for the feature add. I toured a few BJS scenes from the main website last night, choosing 'virtual joysticks camera' from their camera selector panel. Often, the right joystick was too sensitive, the left joystick was 'slow' or had low sensitivity/sensibility. #1. Will camera.speed affect both joysticks? #2. If the right joystick is too fast/sensitive (compared to the left vj), do we/can we... use VJcamera.angularSensibility to slow it down? #3. Could JM's issue have been solved...like this...var vjc = new VirtualJoysticksCamera(name, position, scene);vjc._leftjoystick.setJoystickSensibility(number);vjc._rightjoystick.setJoystickSensibility(number);#4. Should we maybe make ._leftjoystick and ._rightjoystick... public? (remove underscore) #5. Does the joystick's _rotationSpeed get involved with our conversation here? #6. Do you think a feature would be possible... WHILE a joystick is active on-screen (being held on)... a user could tap + and - to adjust THAT joystick's _joystickSensibility? (Sorry for so many questions.) VJS Tracks in the Snow Davrous, I see "ring tracks" when I drag one VJ into the other VJ's half-screen space. For example, drag left VJ into right VJ space... it leaves tracks. Same with the reverse action. #7. Do you see that? If so, do you think that needs to be fixed? Thanks D! (and any others who want to answer) Quote Link to comment Share on other sites More sharing options...
davrous Posted July 17, 2015 Share Posted July 17, 2015 Hi Wingnut, The speed property will only affect the direction (left stick) and not the rotation. That's why I've also added 2 new functions getLeftJoystick & getRightJoystick:https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/babylon.virtualJoysticksCamera.ts if you'd like to better tune the global sensibility. It's better to start tuning using the speed property as we're computing the real speed based on the current FPS / deltatime to adjust the move. Still, if you'd like to adjust differently you can now do: var vjc = new BABYLON.VirtualJoysticksCamera("vjc", Vector3.Zero(), scene);vjc.getRightJoystick().setJoystickSensibility(0.5); And thus have access to all properties linked to both joystick: https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.virtualJoystick.ts like also their color or Axis control. I known about the rendering bug on the middle. I need to work on it also, I was too lazy to fix it because I haven't found an easy & elegant solution up to now. Bye,David Wingnut 1 Quote Link to comment Share on other sites More sharing options...
jessepmason Posted July 18, 2015 Author Share Posted July 18, 2015 I just tested it out, works great! Thanks Davrous! Quote Link to comment Share on other sites More sharing options...
davrous Posted July 26, 2015 Share Posted July 26, 2015 Hi Wingnut, I've spent a couple of hours in my plane for Orlando fixing the rendering issues with the rings when going over the middle of the screen. I've fixed also some bugs on the fire action (rendering part also). I've pushed it on the github. Enjoy! David Quote Link to comment Share on other sites More sharing options...
ShufordTech Posted September 22, 2016 Share Posted September 22, 2016 This is not working for me, I can set the left joystick speed with .speed, but getRightJoystick(). Returns no such function exists. jdurrant 1 Quote Link to comment Share on other sites More sharing options...
ShufordTech Posted September 22, 2016 Share Posted September 22, 2016 How do I set the right joystick speed? Quote Link to comment Share on other sites More sharing options...
tranlong021988 Posted January 18, 2017 Share Posted January 18, 2017 same question with @ShufordTech , I can not access RightJoystick thus can not change angularSensibility. Anybody have some tips ? Quote Link to comment Share on other sites More sharing options...
amoshydra Posted April 19, 2020 Share Posted April 19, 2020 (edited) [email protected] I am able to set right joystick speed with setJoystickSensibility. However this requires accessing a private property. const camera = new BABYLON.VirtualJoysticksCamera('VJC', new BABYLON.Vector3(0, 1, -8), this._scene); camera.attachControl(this._canvas, true); camera.inputs.attached.virtualJoystick._rightjoystick.setJoystickSensibility(0.1); I can't seem to find another way that doesn't require accessing any private property. Edited April 19, 2020 by amoshydra Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.