Acceleration in Unity

15 views
Skip to first unread message

Momeka

unread,
Sep 4, 2012, 8:08:11 AM9/4/12
to brassmo...@googlegroups.com
Hi. I've been using the Brass Monkey Unity SDK and I've run into a really random problem. When trying to access the acceleration of the device it keep getting zeros. I have acceleration activated on the controls scheme, I'm on the same wifi, I've tried to disable my firewall. But the thing is some days it works on my laptop and other it doesn't. It worked last night when I tried it and when I got in this morning it didn't and I haven't changed anything in the code or project. It work on some computers but not others.

Any idea what it could be?

Thanks. 

Zach Kamsler

unread,
Sep 5, 2012, 1:54:58 PM9/5/12
to brassmo...@googlegroups.com
The unity SDK does have one issue where it always tries to use the
same port for UDP, which accelerometer events use by default. So
having multiple Brass Monkey Unity games running on the same machine
can interfere with each other. So please verify that no other games
are running.

We have had reports of issues with Accelerometer events on certain
Android devices that we have been unable to isolate thus far. If you
are interested in helping, looking at the device logs could be useful.
There are multiple third party apps that can be used to retrieve the
device logs on Android
(https://play.google.com/store/apps/details?id=com.xtralogic.android.logcollector&hl=en).
You can also use the Android developer tools if you prefer.

The general procedure for getting logs is as follows:
1) open the log collecting app
2) open the BrassMonkey app, and reproduce the undesired behavior
3) switch back to the log collecting app and send the logs



If all else fails, you can make the game force the device to send
events over TCP, although there is some performance impact to doing
so.

The call has the following signature:
public void SetIncomingReliability(BMDevice device,
BrassMonkey.IO.ConnectionReliability touchReliability,
BrassMonkey.IO.ConnectionReliability accelReliability)

It could be used as follows:
BMConnection.getInstance().SetIncomingReliability(device,
ConnectionReliability.RELIABLE_ORDERED,
ConnectionReliability.RELIABLE_ORDERED);

-Zach
> --
>
>
>
Reply all
Reply to author
Forward
0 new messages