playMaker

Author Topic: Change World Scale for VR games?[SOLVED]  (Read 10882 times)

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Change World Scale for VR games?[SOLVED]
« on: May 04, 2016, 04:57:58 PM »
It would be great to have an action that changes the world scale for the camera in VR games. My game is first-person, but you can go into third person, and when you do, the world is a tiny little playhouse with your character inside it.

But I can't implement this scale change (on static geometry, for instance) without some kind of action, it seems?
« Last Edit: July 28, 2016, 08:39:28 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Change World Scale for VR games?
« Reply #1 on: May 05, 2016, 02:40:01 AM »
Hi,

 Yep, you are right, you'll need custom actions, I made them and they are now available on the Ecosystem.

VRSettingSetRenderScale
VRSettingGetRenderScale

I also made accessible the device type

VRSettingGetDeviceType
VRSettingSetDeviceType

Let me know how it goes or if you need more actions.

Bye,

 Jean



 Bye,

 Jean

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Re: Change World Scale for VR games?
« Reply #2 on: May 05, 2016, 11:42:09 PM »
Thanks! I am excited to try them out. Also, who are you in relation to Hutong Games and Playmaker, and why do you do so much awesome stuff?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Change World Scale for VR games?
« Reply #3 on: May 06, 2016, 01:51:02 AM »
Hi,

 The constant and steady effort I am trying to provide is because PlayMaker is hiring me for this. I help support, I create bridges between PlayMaker and other systems, and other addons to widen the range of possibilities, I also help debugging beta versions, etc etc.

So all credits goes to HutongGames, who's aggressively investing back your money into providing support. So when you buy a PlayMaker License, you also buy long term support, which is not really advertise that way, but how it is in reality.

You can also follow me on twitter and github to get informed of the latest news.

Bye,

 Jean


Bye,

 Jean

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Re: Change World Scale for VR games?
« Reply #4 on: May 06, 2016, 01:39:47 PM »
Great. Yeah, the continued support is a super important selling point (since I can't make games without playmaker).

I tried the set vr scale action,with the game object set to my main camera, but then nothing happened. Do I need to be sure to use the official OVR camera rig? Or should I be using this action to scale the world objects?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Change World Scale for VR games?
« Reply #5 on: May 12, 2016, 02:24:38 AM »
Hi,

 Yeah, that only works when using a proper VR rig as it affects the textures being feeded to each eye.

Also, this action is a project wide action, you can call it from any GameObject,

http://docs.unity3d.com/ScriptReference/VR.VRSettings-renderScale.html


Bye,

 Jean

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Re: Change World Scale for VR games?
« Reply #6 on: May 15, 2016, 05:34:36 PM »
I used the OVR Rig. When I change the VR scale, what is changed is the pixel resolution in the goggles, not the size of objects in the world. Like, the image just becomes super pixelated if I set it to 0.5. Am I doing something wrong, or did I mis-describe what I needed?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Change World Scale for VR games?
« Reply #7 on: May 16, 2016, 02:10:48 AM »
Hi,

 Likely it was a confusion of what render Scale does on my end. Sorry about that :)

The only way I know to change the world scale.
Maybe you should ask that question on the Oculus forum, if you have an answer, get back to me and I'll implement it if needed.

https://forums.oculus.com/vip/discussion/5739/unity-1-unit-1-metre-very-important

 Bye,

 Jean

dorkirt

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Change World Scale for VR games?
« Reply #8 on: June 28, 2016, 09:22:00 AM »
If you change the Camera GO Scale Size you change the size of the world geometry . Take note doing so you can break your gameplay... Just test and check.

westingtyler

  • Sr. Member
  • ****
  • Posts: 277
    • My Video Game Projects Web Site
Re: Change World Scale for VR games?
« Reply #9 on: July 14, 2016, 01:19:42 PM »
Holy crap it worked. I could have SWORN I tried this before. Scaling the Oculus Rig scales the eye distances and makes me cross-eyed, but putting the main Unity camera into an empty game object allows me to scale the parent object at runtime, thereby scaling the WORLD. Scaling down produces no problems, but scaling up past a certain point gives the cross-eyed effect. I am so glad this is solved! Now I can make awesomeness. Thanks, guys.