Dive Board



Re: Plugin 2.0 r498

Re: Plugin 2.0 r498

by mptp on Sep 5th, 2014 16:46 PM

Hmm, what device are you using?
The auto-calibration isn't triggered by looking down so much as holding still for more than 5 seconds (I think)
However, I noticed that on my old S2, the autocalibration was ticking over way too fast.

Try doing an adb logcat with the command:

adb logcat JNI:I *:S


It should be updating once per second. If it is, and it's still autocalibrating undesirably, then you might be shit outta luck :P

mptp

Posts: 6

Joined: 24.08.2014


Re: Plugin 2.0 r498

by pyratej on Sep 5th, 2014 21:24 PM

I'm developing mostly on a Nexus 4, and see small drift problems there. Funny thing is, the app requires the user to look in one direction for a few seconds to select some items, and also to view content. So people that are fidgety seem to have no problem, the people who don't look around much get the drift. Is there any way to turn the auto calibration off after a few minutes?

The HUGE problem i'm having is with the iPhone5s, MAJOR drift there. It might end up being a deal breaker for us. I have read that a factory calibration of sensors are horrid to begin with. Thinking about trying to device my own calibration once again. But i'm about out of time :(

Thoughts? (I'll check adb and see whats going with the Nexus 4)

Thanks for your time mates,
Jason

pyratej

Posts: 12

Joined: 27.08.2014


Re: Plugin 2.0 r498

by Vno on Sep 8th, 2014 16:59 PM

I tried the Dive unity plugin with some devices (smartphones and tablets) and never got any problem, even with the old plugin. But i recently tried a LG VS920 and the behavior was totally crazy, jumping between two different direction all the time. The new plugin solves most of this behavior but i still have a shaky effect even when the phone remains still. Is there a simple fix for this kind of issue?

Great work in any case!

Vno

Posts: 3

Joined: 08.09.2014


Re: Plugin 2.0 r498

by jacknorrisuk on Sep 17th, 2014 12:17 PM

I've just tried updating to this, but I'm not getting any movement out of the gyros at all. The scene still plays, but not so much as a twitch from the sensors, so something must be disconnected in the script. Any idea?

Edit: It seems I can swap out libdivesensor.so and divejava.jar, but the new opendivesensor.cs will jam it somehow. Still, with just these files, the auto-calibration works great!

jacknorrisuk

Posts: 17

Joined: 05.09.2014


Re: Plugin 2.0 r498

by cmiltiadis on Sep 22nd, 2014 15:00 PM

it seems to work ok apart from some occasional jitter on continuous long rotations of the head.

i have a problem though i need to ask you.
I need the phone to be in lanscapeRight configuration, which the plugin doesn't really like.

is there an easy way to fix this? At the moment i am adding a-180 degree angle on the Z axis of the rotation

#note i am using it on an iPhone 5s.

cmiltiadis

Posts: 10

Joined: 20.07.2014


Re: Plugin 2.0 r498

by hypersniper05 on Sep 28th, 2014 03:40 AM

To fix the jitter problem and for a smooth look , here's a really easy fix.

In the OpenDiveSensor.cs go to the Update method and look for "get_q(ref q0,ref q1,ref q2,ref q3);" here is where the sensor values are passed. Add the following code under this line:

rot = Quaternion.Lerp(rot, new Quaternion(-q2, q3, -q1, q0),Time.deltaTime * lookSmoothSpeed);


then comment out the rot.x , rot.y, rot.z and rot.w on the following lines.

Now add a public float variable on top named "lookSmoothSpeed" with a value of 5f seemed ok for me.

public float lookSmoothSpeed = 5f;


And thats it really. If you want to get more fancy you can add a animation curve instead of the float for different looking scenarios. To do this you add this variable on top :

public AnimationCurve lookSmoothSpeed ;


and instead of adding the above rot , use this one:

rot = Quaternion.Lerp(rot, new Quaternion(-q2, q3, -q1, q0),lookSmoothSpeed.Evaluate(Time.deltaTime));


I made my curve straight starting at 0,0 to 1.0, 3.0.

If you have any questions just ask. Thanks

-Erik

hypersniper05

Posts: 1

Joined: 28.09.2014


Re: Plugin 2.0 r498

by Shinkaze on Sep 30th, 2014 08:24 AM

I am getting a build error exporting the Unity Demo with no changes.

Downloaded r498 Dive_Unity_Demo, opened
Change Build Settings to iOs
Build and Play
Console Errors out on a missing 'AndroidJavaObject'

Thoughts?

Shinkaze

Posts: 1

Joined: 30.09.2014


Re: Plugin 2.0 r498

by albusorin on Oct 3rd, 2014 16:40 PM

If I stop and restart the DiveDemo multiple times(by press the home button and then run again the application), the rotation provided by plugin throught get_q() is NaN, and the demo application is crashing.
How can I reinitialize?

albusorin

Posts: 2

Joined: 03.10.2014


Re: Plugin 2.0 r498

by DELETED on Oct 4th, 2014 14:03 PM

Apologies for being daft, but I've just got myself a Dive, which I love, but have encountered the drift issues, and being shamefully honest I don't understand how to use the information available to fix it.

Could someone kindly explain how to install it all, like I'm a 70 year old woman?

Thanks!

DELETED

Posts: 1

Joined: 04.10.2014

dive-owner


Re: Plugin 2.0 r498

by waheed11 on Oct 5th, 2014 16:08 PM

Hello ,

I faced the below issue with this new release :

viewtopic.php?f=1&t=2897

Any help please

waheed11

Posts: 5

Joined: 04.10.2014


STATISTICS


Total posts: 171547


Total topics: 41576


Total members: 44836


Newest member: Daniel G.