Device tilt with specific interaction

Hi there, i want to ask if i can create game with device tilt option, but when it hit the wall (right side for example) to run some notification inside another time line, or to make the shape that has been moved to appear like it is cracked a little bit

That's not going to be easy. You have two major hurdles.

The first is that you need special permission to access the accelerometer data… Hype4 phone Tilt to control gravity not working on IOS 12? …I haven't checked on that issue in a while, but apparently access to that kind of data is a possible security risk. So, it's blocked. Maybe that's the "Permissions API" is a possible fix… Permissions API - Web APIs | MDN

Next, you'd need to understand collision detection in the Physics engine. There's an example of this with the "Jump" template… Physics Mini Templates for Tumult Hype 4 - #23 by Photics …fairly complicated, as it requires an understanding of JavaScript and the Physics engine (Matter.js) in Hype.

1 Like