hey guys i was wondering if you could clear something up for me. Basically its for the following lines below i would be really great full if you could help me :)
Line 1
Code in Java :
OriginalRotation = XQuaternion = Quaternion.AngleAxis (RotationX , Vector3.up);
Code In C Sharp :
Quaternion XQuaternion = Quaternion.AngleAxis(RotationX, Vector3.up);
Now the question is in my Java script i created a variable on the top called "var OriginalRotation" and defined it as a Quaternion. Now in the Java Script you can see i have used the OriginalRotation and then defined a XQuaternion with in it and then set the AngleAxis. Now i tried the same in C but it would not allow me to place the variable before it and then define the X angle. it gave me this message
error code:
Assets/FPSScripts/FpsMouseLookCSharp.cs(56,17): error CS0118: `FpsMouseLookCSharp.OriginalRotation' is a`field' but a `type' was expected
now why is that ????
Question 2:
Jave code :
static function ClampAngle (Angle, min, max): float {
C sharp Code:
public static float ClampAngle (float Angle, float Min, float Max){
the question here is why is it that in java it allowed me to use static function and then the define the angles and the fallowed by the type it is which is float. but in C sharp i had to change this to the following line shown in the C sharp line of code. Why is this ?
i would be really great full if someone could really answer this for me thank you very much in advance MCHALO :)