#i feel like i should but i dont

1 messages · Page 1 of 1 (latest)

chilly goblet
#

You're making a rotation for your camera, yes?

topaz osprey
#

yea

chilly goblet
#

Quaternion.Euler() takes three params

topaz osprey
#

so i dont need that bit then?

chilly goblet
#

what are the three parameters that Quaternion.Euler takes?

topaz osprey
#

i would presume X Y Z

chilly goblet
#

you could know for sure by checking the docs, but yeah basically,

#

so what are you passing here?

topaz osprey
#

what do you mean sorry its my first day learning so im not sure

chilly goblet
#

no worries

#

Quaternion.Euler(newRotationX, 0f, 0f)

#

This function is making a rotation for you

#

you're passing three values

#

the first is newRotationX

#

the second and third are zero

topaz osprey
#

is that function only changing the X axis then

chilly goblet
#

yes, It's only setting one axis

topaz osprey
#

right so if i wanted it to change the Y axis i would need to change it to

Quaternion.Euler(newRotationX, newRotationY, 0f) ?

chilly goblet
#

and it's the x axis, which depending on your setup may also be a problem

topaz osprey
#

so looking at it the transforms showed i was moving my y axis but it was not going up or down just left and right

chilly goblet
#

the other folks were correct that this is also wrong:

#

transform.Rotate(Vector3.up * mouseY);

topaz osprey
#

so what needs to change in the script then

chilly goblet
#

Actually, it sort of works

#

You're getting no movement at all on the vertical axis?

topaz osprey
#

nothing

chilly goblet
#

Check your input settings

topaz osprey
#

what you mean

chilly goblet
#

Edit > Project Settings > Input Manager

#

I've dropped your code into my project and removed the above line, it's not really working but I do get vertical camera movement

#

I've removed line 39 and 43 and it kind works

#

So perhaps your axis are not set up correctly

topaz osprey
#

so i checked and both vertical and horiztonal are set to x axis

#

not sure how that happened

chilly goblet
#

aha!

#

Mouse Y should probably be set to Y axis

topaz osprey
#

even with that change it still does not work 🧐

chilly goblet
#

This is your code with those two lines removed

topaz osprey
#

i am at a complete loss

#

my settings seem right and i have removed the same lines yet nothing

chilly goblet
#

your mouse axis settings are like this?

#

That's the code I'm using

#

this is my gameobject setup

#

The script is on the capsule

#

does any of this differ for you?

topaz osprey
#

and i made a new project and the script started working

#

odd