Noob Rotation

Greeting,
I have recently been working on a game that applies the first person view concept, and I was coding in my character movement, and I know this is a noob question, but I’m stuck, I got my character to move but when rotating the mouse, the character does not go in the indicated direction. I was using a character controller at first to fix this issue, but the Character controller wasn’t ideal with my other assets. I hope this was clear enough, please help.

//Mouse Movement

        //X direction
        rotLR = Input.GetAxisRaw("Mouse X") * mouseSense;
        transform.Rotate (0f, rotLR, 0f);

        //Y Direction
        vertRot -= Input.GetAxisRaw("Mouse Y") * mouseSense;
        vertRot = Mathf.Clamp (vertRot, -yTopRange, yBottomRange);
        cam.transform.localRotation = Quaternion.Euler (vertRot, 0f, 0f);
   
        if (isWalking) {

            // Set the movement vector based on the axis input.
            movemt.Set (h, 0f, v);

            // Normalise the movement vector and make it proportional to the speed per second.
            movemt = movemt.normalized * tempSpeed * Time.deltaTime;

            // Move the player to it's current position plus the movement.
            rigidBody.MovePosition (transform.position + movemt);

            //Using with CC don't want
            /*Vector3 speed = new Vector3 (h, vertVel, v);
            speed = transform.rotation * speed;

            cc.Move (speed * Time.deltaTime);*/
        }

You can simply get a vector pointing in the characters direction by using transform.forward nd then you can multiple the horizontal input with this one. Same with sideways vector, but with transform.right. If you add these two together, you get the movenent vector

I understand what your getting at but I can’t figure out how to apply it, do I also use Quaterion.LookRotation?

Actually I figured it out, thanks, however My controls are weird, when I intentional move forward I move right or left.

Yeah, instead of transform.forward times horizontal, use vertical instead

Yeah, As soon as I figured it out, you replied back, thanks so much.

Actually one more question, in monodevelop when I open a new curly bracket, it auto indents itself
to something like this

if(people){
}

and I hate brackets like that i want it to not indent it for me like that. I want to to do this

if(people)
{
}

Do you know how to fix that?

You’ll have to dig through the preferences menu in MD - you’re looking for “formatting” somewhere. You can both have it automatically create the kind of brackets you want, or just turn off the automatic indentation altogether.

Also your view on where brackets go are heretical.

Am I weird if I use these:

one line {
   two line
}

in JScript and others, whilst I use:

one line
{
   two lines
}

in C# and

IF (
   i feel retarded when using this one
)

in batch and sometimes

GL.Begin();
{
   Just for the indentation
}
GL.End();

for stuff, that uses a start-end thingy, without auto indentation (GL, xna spritebatches, etc.)?