- Home /
Smooth Grid Movement
I try the grid system from the wiki link text
but with a 3rd person camera i notice that a hiccup on the contentious movement.
i try iTween for smooth movement but every method i tried to reposition the player on round number. nothing worked out.
one example of my tests. in this i use the same method a Coroutine and a boolean. but that's why i get the same result;
     using UnityEngine;
     using System.Collections;
     
     public class MoveForwardTest : MonoBehaviour {
         
         public int speed = 4;
         public bool isIdle = true;
         
         // Use this for initialization
         void Start () {
         
         }
         
         // Update is called once per frame
         void LateUpdate () {
             if(Input.GetAxisRaw("Vertical") == 1 && isIdle) {
                 StartCoroutine("MoveForward");
             }
             
             
         }
         public IEnumerator MoveForward()
         {
             isIdle = false;
             //iTween.MoveAdd( gameObject, iTween.Hash("z",1,"oncomplete","IsIdle"));
             yield return 0;
         }
         
         void IsIdle()
         {
             isIdle = true;    
         }
     }
 }
               Comment
              
 
               
              Your answer
 
 
             Follow this Question
Related Questions
Move along grid where facing 1 Answer
Grid based movement - using transform.translate 3 Answers
How to smoothen movement of a child object? 1 Answer
How can i drag objects smoothly with touch? Please help me with this code! 1 Answer
Make Character move along a curved path at a constant speed 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                