Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SDK question(s)
#21
Yeah, I actually am good on the diving. But when you have a chance the code for aiming and shooting as in heli/tanks would be great.
Reply
#22
Sorry that goes beyond how our avatars move and gets into how collisions and ballistics are computed. It's more than I can share via code snippets, but is covered by many Unity game tutorials out there.
Reply
#23
completely understood - I will look into it on my own. I appreciate all your help so far!

I actually have a bit of an odd question - I understand if this is also out of your scope but if there's an easy answer that I am missing, I would appreciate it.

When you log in and see the message e.g. "PRESS L + R TO CENTER..." and so on, I can see that this text is defined in VZPlayer using release.text but I am curious if it's possible to change the font and/or font size. I'm experimenting with a "blur" effect on the camera that makes the letters hard to read and if I could make them bigger that would help. Smile
Reply
#24
by the way, do you guys use/recommend any specific release of Unity?
Reply
#25
You can change that text's font and size in its VZController.prefab.

Note that our games have their own VZController.prefab with all the stuff we want to share between levels, and we also override VZPlayer.UpdateSetup to provide a more customized setup flow (including how to recenter).

As for Unity, we are currently on Unity 2019.2.17f1 but the SDK should work fine back to Unity 2017.
Reply
#26
Thanks again!
Reply
#27
So I got a new laptop and reinstalled everything (my old one was almost 7 years old and very slow) and I am having a weird issue. I assume I did something wrong and I will research this a bit more as well but I was wondering if you might have seen the behavior...

In Unity Editor, when playing the game, if I have the build settings set to PC/Mac/Linux Standalone, I can lean forward/back in game with the W+S keys. As soon as I switch to Android these keys don't work anymore. I can use A+D to lean sideways but W+S no longer function. Have you seen anything like this? I am on Unity 2019.2.21f1 - going to try a couple other versions and see what happens...
Reply
#28
Tried a few different versions of Unity and this problem persists... very weird.  I'm going to have to fire up my old laptop and see if it behaves the same way because I honestly don't remember...

OK, so I am not sure why, but maybe you know Smile

It seems this is related to 'Tilt Steering' setting - but the interesting thing is that when I open the VZController prefab I can see this is not set (prefab.jpg) ...


but when I go into Play mode, and am playing the game, I click into the VZController object that has been created, and Tilt Steering is enabled (play_mode.jpg)

If I uncheck this box, then leaning forward/back with W+S works again -- but do you have any idea why it is getting checked when I go into Play mode but is not actually enabled in the prefab?  Is there something in the code that enables this in certain circumstances?

Edit: I guess it's this bit, but I'm not sure why it behaves this way, I could swear it didn't always.  I am developing for the Quest for what that's worth.

Code:
   protected virtual void Awake()
   {
#if (UNITY_ANDROID && !VZ_SNAPDRAGONVR) || UNITY_IOS
# if VZ_GOOGLEVR
      TiltSteering = !GvrHeadset.SupportsPositionalTracking;
# elif VZ_GEARVR
      TiltSteering = (OVRPlugin.GetSystemHeadsetType() != OVRPlugin.SystemHeadset.Oculus_Quest);
# else
      TiltSteering = true;
# endif
#else
      TiltSteering = false;
#endif



Attached Files Thumbnail(s)
       
Reply
#29
Ok. I think I'm back on track. Stay tuned Smile
Reply
#30
I think what you are running into is that our SDK defaults to "tilt steering" on Android devices like the Go, which do not have head position tracking.

Tilt steering uses the roll of you head (the amount the horizon is angled) to control steering, rather than head position offset from center. It does not give you a way to lean forward/back, so we have used the B button (left trigger on bike) to dive in games like Pegasus and Heli on the Go.

To get head position control on the Quest just set VZController.TiltSteering to false at Start time.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)