ok so I have the basic concept of 2d free form directional blending and coding the movement for a 2d game but how would I go about it in a 3d game??? I’ll use the same example I used before but this time I would love to know how to execute the script i’ll show the script i used for a 2d game
using UnityEngine;
using System.Collections;
public class Movement : MonoBehaviour {
Animator anim;
// Use this for initialization
void Start () {
anim = GetComponent<Animator> ();
}
// Update is called once per frame
void Update () {
float input_x = Input.GetAxisRaw ("Horizontal");
float input_y = Input.GetAxisRaw ("Vertical");
bool IsWalking = (Mathf.Abs (input_x) + Mathf.Abs (input_y)) > 0;
if (IsWalking)
{
anim.SetFloat ("x", input_x);
anim.SetFloat ("y", input_y);
transform.position += new Vector3(input_x, input_y, 0).normalized * Time.deltaTime;
}
}
}
and this is how I want it for my 3d game watch the time from 14 to 18 seconds in the video
how would I apply the 2d free form directional movement ? any suggestions for the script and set up?
also here’s how I have mine set up


