- Home /
SOLVED, Optimize Game Objects was turned on and once i turned it off it began to rotate.
Bone Not Rotating?
I've made a script which references the bone of my model and it is successfully finding the bone transform. The problem is that i cant seem to rotate the bone through the script nor can i rotate it within the editor, i can move it through the editor but it has no affect on the player model (ie. the model doesn't bend or stretch), the only place where the bones seem to actually affect the model is during animations and within the configure option on the player_model Rig Tab. i do have animations playing at all times (idle,run,run back etc.). Why is my bone not rotating?
private float y = 0.0f;
void LateUpdate ()
{
pitch -= speedV * Input.GetAxis("Mouse Y");
Vector3 newRotation = new Vector3(y,0.0f,0.0f);
//Debug.Log(newRotation );
head.transform.eulerAngles = newRotation;
//Debug.Log(head.transform.eulerAngles);
}
SOLVED Optimize Game Objects was turned on, if i turn that off, my bones have effect on the player model, if its on, bones have no effect on the player model.
Answer by poisoned_banana · Apr 20, 2018 at 05:18 PM
To override an animation you should be using LateUpdate instead
I tried this but its did not work, I updated the code above.
Follow this Question
Related Questions
Use a single rotation axis of a freely rotating object 1 Answer
eulerAngles.y always returns 179.9999 1 Answer
Rotation Jumping values (0 to 180) 1 Answer
How do you smoothly transition/Lerp into a new rotation? 3 Answers
Problem in Euler angles 2 Answers