Twin Stick shooter control system for 3rd person game (using C#)

I’m trying to create a twin stick control system for a 3rd person game. I tried looking at the scripts for Angry Bots but it was waaay to complicated for my level to decipher, which is a shame as I am actually looking for a very similar control system…

All I want to do at this stage is to have the 3D object move around (backwards, forward, left and right) with the left stick and have the player turn the object around with the right stick, telling it where to look and essentially shoot (also, backwards, forward, left and right - no up and down).

I can move the object, but so far it’s facing only one way… :-/

This is my crude code based on the 3DBuzz tutorial for a 2D shooter:

using UnityEngine;

using System.Collections;

public class Player : MonoBehaviour {

public float PlayerSpeed;

// Update is called once per frame
void Update () 
{
	// Amount to move
	float amtToMoveH = Input.GetAxisRaw("Horizontal") * PlayerSpeed * Time.deltaTime;
    float amtToMoveV = Input.GetAxisRaw("Vertical") * PlayerSpeed * Time.deltaTime;
	
	// Move the player sideways and up and down
	transform.Translate(Vector3.right * amtToMoveH);
    transform.Translate(Vector3.forward * amtToMoveV);
	}
}

How can I do it? Preferably in C#?,I’m trying to create a twin stick control system for a 3rd person game. I tried looking at the scripts for Angry Bots but it was waaay to complicated for my level to decipher.

All I want to do at this stage is to have the 3D object move around (backwards, forward, left and right) with the left stick and have the player turn the object around with the right stick, telling it where to look and essentially shoot (also, backwards, forward, left and right - no up and down).

I can move the object, but so far it’s facing only one way… :-/

I can I do it? Preferably in C#?

You need to separate the input from the movements (in your mind, the translate code is actually ok). The fact that it is a two stick control is irrelevant, it should work with any axes. That’s actually what your doing right now with GetAxisRaw(“Horizontal”) !

Now you need an input for the rotation, and rotate from it. However, the rotation is a bit more complicated, so I suggest you take a look at MouseLook (it’s in charactercontroller’s package)