Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  stutter move
#9
(22-09-2020, 03:03 PM)josemendez Wrote: No need Sonrisa. I'm assuming rotation changes only from one Update() to the next, that's why I'm diving by Time.deltaTime instead of Time.fixedDeltaTime.

Ok then I must be doing something wrong. There is my code attached to the object. No error in the console. I'm still getting the stutter I had.

Code:
    void Update()
    {
        // get delta rotation (difference between current rotation and previous rotation)
        Quaternion delta = transform.rotation * Quaternion.Inverse(prevRotation);
        prevRotation = transform.rotation;

        // get angular velocity from that:
        angleVel = new Vector3(delta.x, delta.y, delta.z) * 2.0f / Time.deltaTime;
        //print(angleVel);
        transform.GetComponent<Rigidbody>().angularVelocity = angleVel;
    }
Reply


Messages In This Thread
stutter move - by julienrobert - 22-09-2020, 03:29 AM
RE: stutter move - by josemendez - 22-09-2020, 07:12 AM
RE: stutter move - by julienrobert - 22-09-2020, 01:01 PM
RE: stutter move - by josemendez - 22-09-2020, 01:06 PM
RE: stutter move - by julienrobert - 22-09-2020, 02:06 PM
RE: stutter move - by josemendez - 22-09-2020, 02:12 PM
RE: stutter move - by julienrobert - 22-09-2020, 02:57 PM
RE: stutter move - by josemendez - 22-09-2020, 03:03 PM
RE: stutter move - by julienrobert - 22-09-2020, 03:11 PM
RE: stutter move - by julienrobert - 23-09-2020, 02:20 PM
RE: stutter move - by josemendez - 23-09-2020, 02:52 PM
RE: stutter move - by julienrobert - 23-09-2020, 03:18 PM
RE: stutter move - by josemendez - 23-09-2020, 03:23 PM