Float not Multiplying

So all this script is doing is detecting the relative speed of movement and rotation of an object and then combining those to output a float to another game object. when I multiply the variable heightDifference it works as expected, but for some reason, rotDiff does not change. the output I’m getting for heightDifference is between .01 and .04 and for rotDiff are between -9 and 10. not only will the number not multiply (I have tried breaking it out into many steps) but it’s not impacting the final output of speedMultiplier.

Have I just missed something super silly?

![using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MagnitudeToSpeed : MonoBehaviour

    public float speedMultiplier;
    public Vector3 startingPos;
    public Vector3 startingRot;

    public float heightDifference;
    public float rotDiff;

    // Start is called before the first frame update
    void Start()
        startingPos = transform.position;
        startingRot = transform.localEulerAngles;

    // Update is called once per frame
    void Update()
        rotDiff = transform.localEulerAngles.x - startingRot.x;

        heightDifference = transform.position.x - startingPos.x;


        speedMultiplier = 1 + (Mathf.Abs(heightDifference) * 100) + (Mathf.Abs(rotDiff) * 100);

        startingPos = transform.position;
        startingRot = transform.localEulerAngles;


Add ‘Debug.Log’ to every variable (startingRot, transform.localEulerAngles and rotDiff) every update.

This could be because you are using x instead of the axis you are actually rotating, because the transform made a full turn, or because you are rotating the parent of the object instead of the object.

Please note that your title is absolutely not descriptive of your problem. Something like “local euler angles not changing on rotation” would be better.