playMaker

Author Topic: Tilt Axis Switched (Unity 4)  (Read 4663 times)

Horror

  • Junior Playmaker
  • **
  • Posts: 79
Tilt Axis Switched (Unity 4)
« on: November 15, 2012, 07:57:13 PM »
Not sure if this is a Unity or playMaker issue, but my device tilting has been switched around since updating to Unity 4!

Tilting forward and back now makes my player turn left and right. It should be noted that this occurs on my Android hardware build but not when using the Unity remote to test on PC. I haven't tested on iOS yet.

I have checked my setup; everything should be working fine. I could change the axis that I'm using, but I'd rather not if it's a bug.

Can anyone else confirm this?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Tilt Axis Switched (Unity 4)
« Reply #1 on: November 16, 2012, 12:05:36 AM »
Hi,

 yes, now gyroscope axis follow orientation on Unity4. you need to refactor.

 Check out the unity 4 release note ( I know it's huge... but i'ts always good to know what's there), quite a lot of area has been worked on that needs refactoring.

bye,

 Jean

Horror

  • Junior Playmaker
  • **
  • Posts: 79
Re: Tilt Axis Switched (Unity 4)
« Reply #2 on: November 16, 2012, 08:24:24 AM »
So Pitch = Roll now?

Not sure what you mean by refactor. Am I just compensating for a change? If I switch my axis around it will fix the device build but I will have to tilt forward and back to look left and right when testing with the Unity remote.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Tilt Axis Switched (Unity 4)
« Reply #3 on: November 16, 2012, 10:14:10 AM »
hi,

not sure actually if this related, but the release notes says:
Quote
iOS: Now iOS sensors follow screen orientation. No more complicated code for axis remapping! This can be switched off via Input.compensateSensors. Requires code refactoring

http://unity3d.com/unity/whats-new/unity-4.0

so now it's likely tgat orientation you hd on you device has now its axis readjusted. so tilt will always be tilt regardless of the device orientation. i haven't tested it yet tho, so not sure what it means in terms of coding

bye,