Smooth Accelerometer for 3D hologram effect
Hey everyone. Has anyone done such a thing before? What I mean is that I have a scene where there are no animations. Its just layered images:
1) sky with clouds background
2) mountains
3) house in the foreground
I want the background and mountains to react to the user's tilting of the device. The the device tilt's to the left, you will see the background move to the right. So will the mountains but at a slower speed. The same goes for tilting the device to the right, it moves in the opposite direction.
The House in the foreground (top most layer) doesn't move. So it gives an impression of the user looking at a 3D image. Much akin to looking a 3D hologram.
I've tried to do it, but I just can't get around to the jerky movement.
Anybody can help?
1) sky with clouds background
2) mountains
3) house in the foreground
I want the background and mountains to react to the user's tilting of the device. The the device tilt's to the left, you will see the background move to the right. So will the mountains but at a slower speed. The same goes for tilting the device to the right, it moves in the opposite direction.
The House in the foreground (top most layer) doesn't move. So it gives an impression of the user looking at a 3D image. Much akin to looking a 3D hologram.
I've tried to do it, but I just can't get around to the jerky movement.
Anybody can help?
Comments
i believe you use constrains right?
I suggest try using :
Timer - every 0.1 sec
Interpolate position.X TO "your expression"
Duration 0.1
Maybe this will soften the jerkiness
All my games on Google Play
All my games on Google Play