- Home /
How to fix main camera moving with animation of parent player object?
See example here: https://imgur.com/a/vnYe1
I imported Ethan into Blender 2.79, setup a simple looping skating animation, and exported a fbx. I then imported that fbx into Unity 2017.20f3. Finally I dragged the Main Camera to make it a child of Ethan, and gave Ethan a simple script to move him with WASD (code at bottom).
I'm a noob to both Unity and Blender, so I figure I messed up the animation somehow, but I can't tell what part of Ethan is making the camera sway left to right like that.
Player move code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class playerMove : MonoBehaviour {
public float moveSpeed = 1;
// Use this for initialization
void Start () {
moveSpeed = 5f;
}
// Update is called once per frame
void Update () {
transform.Translate((moveSpeed * Input.GetAxisRaw("Horizontal") * Time.deltaTime)/10, 0f, moveSpeed * Input.GetAxisRaw("Vertical") * Time.deltaTime);
transform.Rotate(0f, Input.GetAxisRaw("Rotate") * 180f * Time.deltaTime, 0f);
//transform.rotation = Quaternion.LookRotation();
}
}
Any help is appreciated
Answer by WhatlsMyName · Jan 17, 2018 at 04:45 PM
...is my question too vague? or is there something I can do to make it easier for people to help me with this?
Your answer
Follow this Question
Related Questions
Blender animation walk in unity 1 Answer
I can't get more than one animation when importing from Blender 2.8 to Unity. 0 Answers
Unity Skeletal Animation Performance Question 0 Answers
How should I import a snowboard character? 0 Answers
Blender animation on rigged character not the same in Unity... 2 Answers