Creating gameplay has definitely being one of the things I've enjoyed the most!
I'm skipping the 3rd because it worked horribly for us hahaha
It used the accelerometer to move the camera... and let's just say that it was kinda messing.
This time I took inspiration from Super Mario 64 controls and camera. Of course totally mimicking it wouldn't have worked for me so I tried to get close enough to the point that it would work for me.
This version is the one we liked the most. Still could use some edge softening, but well... 3 months is too little time stay too long in gameplay considering I'm the programmer of our project (can't complain though, I'm enjoying it!).
A bit about how it works.
In this version the pad's center is created where ever the player touches the screen. From there the drag will of that touch will become a Vector2 (x,y) which will be used to give the character it's movement.
This input is also used to control the direction in which the mesh of the character is facing. To do this I needed an object that could orbit around the sphere.
Now, the invisible sphere on front is what the characters mesh looks at, and the sphere over the mesh is what the player actually controls (our dear sphere from the earlier prototypes).
When I needed to add the camera to the equation it got a bit more complicated. The direction in which the character moves depends on the camera and the rotation to where the camera needs to rotate after the player stops moving depends on the character.
The camera also orbits around the player in the same way I described above and will only adjust if a few conditions are met (like letting movement touch go).
Luckily this is much easier to explain here than to actually make it with work all the things that are going on under the hood, but it was a fun challenge. The important thing was to make it behave in a way the player would "feel it more right".
I just great memories of this project, it's was a great learning experience!
[j]