Hello I really could use some help with this and this will need some explaining!
On the iphone homescreen there is a picture and when the device is titled left, right, up, or down the image slightly moves with it and then stops once the device has gone to far. It shows more of the picture in either directions when it is titled that way and then returns back to normal once not moving.
How would I be able to accomplish this in unity?
Any help would be appreciated!
You’ll need to use Unity’s Gyroscope capabilities, Heres some links :
Depending on how much experience you’ve had, it will determine how well/easily you complete this.
I’ll explain how to do it as its the best way to learn, when i get home i’ll add some code snippets.
Start by getting the input of the gyro and reversing it,
then create a offset vector which will be your sprite transform,
Create a clamp (Mathf.Clamp) - This will determine how much it will move,
Then you create a smooth move function (possibly Vector3.MoveTowards), this will create that slow movement.
This is just a rough way of doing it which you will need to polish up!
Here is the code!