Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  stutter move
#6
(22-09-2020, 02:06 PM)julienrobert Wrote: I figured the problem was that convex was not checked in the mesh collider.

My next challenge will be to synchronize the movement of my iPhone with the movement of the container. It worked before using rotation, I expect using Torque will be quite difficult!

No need to calculate the torque that would get you to a certain orientation, you could just make the rigidbody kinematic and derive angular velocity from the rotation delta. The formula for that is:

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

// get angular velocity from that:
unityRigidbody.angularVelocity = new Vector3(delta.x,delta.y,delta.z) * 2.0f / Time.deltaTime;
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