# How to recreate Tenkyu (roll-a-ball) like game?

Hello!
I am currently trying to make a good portfolio and I have found one pretty interesting game which I am trying to recreate — Tenkyu by Voodoo. You can see gameplay here

I am wondering how one would recreate such game in easy way.
I think first the easiest way is to just tilt the platform and apply bigger gravity.

• no additional force management, ball just fall and roll down
• no additional camera view management
• ball just behaves weird — it doesn’t actually stick to platform, get random collisions with platform surface which apply on a ball and make it behave “unnatural” like bumping it and so on

And another way is to actually tilt the camera instead of platform to make it look like it’s tilting and manage forces by script (force shall have opposite direction to swipe).

• no unwanted collisions with surface of a platform
• thus ball behaves better
• it is necessary to be careful with forces you apply on a ball or else it wont be looking natural
• it is fairly harder way to do the same thing

My main question is anyone has any ideas how to make it properly? I tried to mix it up a bit — manage forces by script and also tilt the platform without tilting the camera. It doesn’t look good enough for me.

When I did this, I altered the direction of gravity for the physics engine, and rotated the camera to make it seem as though the world was tilting. This means you don’t have to move anything. It’s not difficult to do.

This is how I made alteration of gravity in my case

``````/// <summary>
/// Class that allows to make own gravity and tilt it a bit by swipes
/// </summary>
public class TiltGravity : MonoBehaviour
{
public float gravityScale = 1.0f;
private static Vector3 globalGravity;
private Rigidbody rb;
private Touch touch;
private Quaternion rotation;
public Vector2 deltaPosition;
public Vector2 rotationAdjust = new Vector2(1, 1);
public Vector3 gravity = new Vector3();
public float maxRotation = 20f;
public float minRotation = -20f;
void OnEnable ()
{
globalGravity = Physics.gravity * gravityScale;
rb = GetComponent<Rigidbody>();
rb.useGravity = false;

}

void Update()
{
if(Input.touchCount > 0)
{
touch = Input.GetTouch(0);
if(touch.phase == TouchPhase.Moved)
{
rotation = Quaternion.Euler(
0,
deltaPosition = touch.deltaPosition;
}
}
}
void FixedUpdate ()
{
gravity = rotation * globalGravity;