I’m using Force to gain momentum but I can’t seem to smooth out the frame stutter.
http://reeltrash.com/hoverboard-prototype/

added a screenshot:

I’m using Force to gain momentum but I can’t seem to smooth out the frame stutter.
http://reeltrash.com/hoverboard-prototype/

added a screenshot:

Here’s the Movement controller script. Please tear it a new one. ![]()
using UnityEngine;
using System.Collections;
using UnityStandardAssets.CrossPlatformInput;
public class hoverscript : MonoBehaviour {
public float speed = 0; // speed in meters per second
public float thrust = 0;
public Rigidbody2D rb;
void Start() {
rb = GetComponent<Rigidbody2D>();
}
void FixedUpdate() {
KeyMovement ();
rb.AddForce(transform.forward * thrust * Time.deltaTime);
}
// void Update(){
// KeyMovement();
// }
void KeyMovement(){
Vector3 moveDir = Vector3.zero;
moveDir.x = Input.GetAxis ("Horizontal"); // get result of AD keys in X
moveDir.y = Input.GetAxis ("Vertical"); // get result of WS keys in Y
// move this object at frame rate independent speed:
transform.position += moveDir * speed * Time.deltaTime;
// print (moveDir.y);
}
}