Jump to content

Search the Community

Showing results for tags 'gyroscope'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 6 results

  1. I'm using the `deviceorientation` event to get phone rotation data. And I'm noticing that at least on my device the rotation data is very "jumpy". That is it can look something like this: 0 -10 0 1 2 4 40 20 Have not had a change to try the Gyroscope API but I imagine it has the same limitation. My question is, does any one know of a technique to smooth of the rotation data. So in the above example, it would be `0, 0, 1, 2, 4, 20`. The use case is that when a user rotates the phone to the left/right, the app would apply a force vector. But with jumpy data like the above, the result isn't a smooth experience.
  2. How do you guys do motion detection (if any) in your apps? Motion detection is when you detect when the user shakes their phone (for example). I just tried the following in Android Chrome to no avail: devicemotion event API. Supposedly it works on Chrome but it had no effect on my phones. See https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent. Interestingly, it did work on Firefox Focus this code snippet for cross-browser compatibility. Again, it did not work on Android Chrome. See https://stackoverflow.com/a/4378439/555493 the Gyroscope API. See https://developer.mozilla.org/en-US/docs/Web/API/Gyroscope Curious to see what people do to handle device motion. Currently, the best approach seems to be to use something like Flutter to shove device motion events into state, render the app into a Web view, and then query the motion state from the Web view as needed.
  3. Hi guys, I'm making a game which uses browser gyroscope data as player's input. The aim of the game is to align a bar controlled by the player with a bar that continuously rotates. In order to rotate player's bar, the phone must be tilted on its x axis. When holding the phone perfectly vertical (first image) there is no problem. But when the phone has some rotation on its y axis or is pointing downwards (second image), the rotation that I'm interested in is no longer correct. Is there any workaround to make x rotation relative to the position that the back of the phone is pointing to? It is ok to use any library. I've tried gyronorm.js and gyro.js so far, but none of them are giving me the desired results.
  4. agora

    Phaser and gyro

    Hi, Does phaser play nicely with gyro.js? Does it have a built in gyro support for ios input? I could not find anything in the documentation or example. Thanks!
  5. Hello guys, I want to move my sprite to left/right using the gyroscope/accelerometer. Is there something on panda to do this? Edit: Unfortunately the link here: http://www.html5gamedevs.com/topic/7064-how-to-use-accelerometer/?hl=accelerometer is offline.
  6. Hi guys, I am completely new to js and HTML5. I want to make a simple game in which you roll a ball around a maze by using a tablet/mobile devices orientation. Does anyone have any pointer on how to achieve this? I have looked at gyro.js so far but have no idea how to implement its use.
×
×
  • Create New...