#Hey everyone Suuuuper beginner here I m
1 messages · Page 1 of 1 (latest)
I've been trying transform.rotation.x and transform.localrotation.x but neither of those seem to do anything. Also a bit confused on where I should add these lines in? Trying to control the throttle/thrust of a wingsuit
The code is jumbled as hell cause I have barely an idea of what I'm doing, just kinda trying to follow tutorials and figure things out as I go
You can't reference a value type. Need to learn about value types vs reference types in C#.
Also rotation and localRotation are both quaternions not Euler angles, so you probably wouldn't get the value that you expect from them.
Oh, that would explain all the trouble I've been having, thank you! I got something to work by using localRotation but I'm getting the weird values from the Quaternion. Should I reference localEulerAngles instead? Or should I try to reference the x rotation in a different way?
You could get the Euler angles from a quaternion or get them directly from a transform like with localEulaerAngles. There's also the difference between global(world space) and local rotation that you should learn about.
In either case, you don't reference any of it, you copy the value.