copy rotation script doesent copy the full 360 degrees?
hey! iam trying to copy the rotation of a wheel: https://gfycat.com/DamagedUnfinishedBlackrussianterrier
onto the pedal of my bike, with this script: using UnityEngine; using System.Collections;
public class copyrotation : MonoBehaviour {
public GameObject wheel;
public GameObject bike;
void Update () {
transform.rotation = Quaternion.Euler(wheel.transform.rotation.eulerAngles.x, bike.transform.rotation.eulerAngles.y, 0);
}
}
but that doesn't really work well as you can see here: https://gfycat.com/LeafySlimyIchthyosaurs
it somehow just moves back and forward but i dont understand why. there is no other script on it and no rigidbody. also when i unparent the pedal it has the same behavior
Your answer
Follow this Question
Related Questions
Why does this quaternion euler not compute? 0 Answers
Draw a ray from a gamobject and keep direction of the ray relative to the gameobjects rotation. 1 Answer
How to make a 2D sprite rotate towards a specific point while facing perpendicular to the camera ? 1 Answer
Have angle problem in rigidbody.moveRotation 0 Answers
Something seriously weird is going on with my transform.eulerAngles 0 Answers