Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: merde10 on September 23, 2015, 12:52:50 PM

Title: device roll limit angle [SOLVED]
Post by: merde10 on September 23, 2015, 12:52:50 PM
Hello Guys,

My little cousins had a cow box (a box when you turn, a sound of a cow is playing). But it was broken.

And i was thinking about create an app of cow box for them (it can be a good practice for me).

So i began to start my project but i have an issue about rolling the cow box.

When i use unity remote on my android device, the cow box roll when my device is turn. But i want him to play a sound when the cow box reached a angle value (like 180°).

The problem is that i am stuck in the state "device roll", and it doesn't continue to the next state.

How can i fix that?

Thanks ;)
Title: Re: device roll limit angle
Post by: jeanfabre on September 24, 2015, 02:03:04 AM
Hi,

 simply don't :) use the orientation, you'll get discrete events and it's 1 minute to implement :)

use Device Orientation watcher (https://github.com/jeanfabre/PlayMakerCustomActions_U3/blob/master/Assets/PlayMaker%20Custom%20Actions/Device/DeviceOrientationWatcher.cs) on the Ecosystem (http://j.mp/1Esn1mF) for this.


 Bye,

 Jean
Title: Re: device roll limit angle [SOLVED]
Post by: merde10 on September 24, 2015, 11:16:27 AM
Thanks,

it works fine! ;)