Spinning animation problem
I have a movement script attach to an game object in my game. The game object can either move around the "X" axis or the "Y" axis depending on what I set it to. I wanted to add animation to my game object to add a spinning affect while it moves. In the animation window, I used transform rotation and rotated it each 10 second time scale, I then set the animation to "loop" so my game object will continue play the animation, however when i'm playing the game my game object animation spins too widely and moves downs even though I set the movement script to: X:- 1 Y:- 0 Z:- 0 . How would I stop the movement from moving down and make my game object move the they I created in the animation window. which is something like this. Thank you!!! Here;s my movement script:
using UnityEngine;
using System.Collections;
public class movement : MonoBehaviour {
// Player Movement Variables/....
public static int movespeed = 20;
public Vector3 userDirection = Vector3.right;
public void Update()
{
transform.Translate(userDirection * movespeed * Time.deltaTime);
}
}
Your answer
Follow this Question
Related Questions
´How to check if 3D player is moving? 0 Answers
Sync Anima2D Animations with Player Movement 0 Answers
Character Animator controller/movement 0 Answers
Problems with Movement on rigged 2d animation., 0 Answers
Lerp Animation Problem 1 Answer