Search the Community
Showing results for tags 'virtualjoystick'.
-
I want to build a top down, twin stick shooter and I wanted some help in figuring out the best way to implement it. There will be other buttons on screen as well. A static joystick is fine, no need of a dynamic one. I have tried out the vjoy plugin, but I didn't find it good enough as it only had events for up, down, left and right. I want more specific information. Should I just use pointers or is there a way to implement nippplejs, or is there a better option?
-
- twin stick
- phaser2
-
(and 2 more)
Tagged with:
-
Hello, I'm developing a game with Ionic 3.5 and PHASER-CE, I recently bought the VIrtualJoystick and when trying to implement I'm getting the error: this.game undefined. ERROR ( core.es5.js:1084 ERROR TypeError: Cannot set property 'game' of undefined at Phaser.PluginManager.add (phaser-split.js:8917) at Fogo.webpackJsonp.274.Fogo.create ( ) Can you give me some help on how to implement this plugin. PS, it's all in typescript create() { this.game.plugins.add(Phaser.Plugin.VirtualJoystick); } Thank you for your attention, I'm sorry, my English, because I'm in Brazil and my language is PT-BR
- 2 replies
-
- joystick
- virtualjoystick
-
(and 1 more)
Tagged with:
-
Hi, I purchased the joystick plugin and works fine most of the time, but I have an issue and can´t figure out what's wrong, so, I was wondering if it's an issue: - Using Phaser 2.4.6 and last version of Virtual Joystick Plugin - Using stick.showOnTouch = true; Problem: when changing state, if the stick is keep pressed, trying to use either: stick.destroy(); or pad.removeStick(stick); Throws the error: phaser-virtual-joystick.js:1042 Uncaught TypeError: Cannot read property 'length' of null This seems to happen once the stick is removed... Please let me know your comments. Thanks in advance.
- 2 replies
-
- virtualjoystick
- plugin
-
(and 1 more)
Tagged with:
-
Hi everyone! During a quest to solve this post by @ian, I came across some VJ problems. A while ago, I worked-on some virtual joystick aux canvas issues, and made this demo... that uses a VJ to adjust the rotation of a box. It works ok. After 20 seconds, it releases the VJ canvas and returns the playground to "normal". It also "brought-in" the entire VJ code from the framework... just to make it easy to mess-around and experiment. Naturally, I wanted to give @ian a cleaner playground demo... to do arcRotate cam-controlling tests with a VJ, so I first tried to remove the hijacked code (the vj source code). That attempt is here... http://www.babylonjs-playground.com/#OORFZ#13 It still releases after 20 seconds, and seems to work (the box rotation is turned-off in #13, so ONLY the vjcanvas and rings are active). Believe it or not, 10 minutes ago... it didn't work. It seems that... when working with VJ's, we REALLY (thoroughly) need to "clean up" between tests. ----------------------- The actual question: Out on the BJS main website... http://www.babylonjs.com/Demos/SpaceDeK/ ...select the camera icon on the right side, and choose 'virtual joysticks camera'. The VJ's go active (drag on right side of screen = tilt and turn, drag on left side of screen = truck and dolly)... but NO RINGS. OH NO! Anyone else seeing a lack of VJ rings... when 'virtual joysticks camera' is selected on the camera panel? (thx) ----------------------- Ian, if you are reading-along, I will begin playing with your quest for virtualJoystickArcRotate... or some kind of kludge that works. THIS post was supposed to be about #13 not working... having its rings not appear at all, or having them appear when the joystick is first constructed. #13 had problems. In the middle of posting this message, it started working. (weird) So now I/we can get back to work on your challenge. Ian, I want to show you something... and we will talk more in your thread. Take a look here, if you please... https://github.com/BabylonJS/Babylon.js/tree/master/src/Cameras There is the folder of source code for our cameras. The inputs folder is part of our new Custom Camera Inputs system. (don't bother looking for arcRotateCam demo-code in the docs. Sadly, it isn't there.) See the folder named "inputs"? Let's visit that. In that folder, notice that there is https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/Inputs/babylon.freecamera.input.virtualjoystick.js (VJ for free camera)... but no parallel file for the arcRotateCamera. hmm. What can be deduced from the lack of an input file for VJ's on Arcs? I'm not sure, yet. I would say that, for now, we cannot count-on our new inputs system to handle a VJArcCam. So, we go hacking... trying to kludge something. You and I (others welcome) might be able to get started on a VJ-Arc... by hacking on demo #13 and kludging something into existence. I am NOT encouraged by the lack of VJ-Arc inputs file, and lack of ArcRotate demo code in the custom input docs. Maybe others can shed some light. VJ's for Arcs could be a tough grind... not sure, yet. Tests ahead, starting with demo #13 if it remains operational. Side note: bGUI was recently seen interfering with VLS godrays, and with lens flares. POSSIBLY... the extra canvas (called vjcanvas) used in virtual joysticks... interferes with them, too. That needs testing as well. SO much to do, and SO little gumption. heh