Quantcast
Channel: Latest Questions by studentvz
Viewing all articles
Browse latest Browse all 14

Unity 5 - Can't move/control object

$
0
0
Hello, If I open a project from Unity 4.6 in Unity 5 I can't control my object anymore. I also created new project in Unity 5, set a scene with some ground and object (cube) that I want to move with my keyboard keys. I attach script to object and start the scene but object is not moving. Same thing is working in Unity 4.6. Script is very simple: using UnityEngine; using System.Collections; public class Move : MonoBehaviour { public int speed = 0; private Vector3 input; void FixedUpdate(){ Vector3 input = new Vector3(Input.GetAxis ("Horizontal"), 0, Input.GetAxis("Vertical")); GetComponent().AddForce(input * speed * Time.deltaTime); } } I'm not using any kind of animations in my project. EDIT I opened my Unity 4.6 and project that I'm working on (project was not opened with Unity 5), and now even there I can't move my object. Maybe some conflict betwen Unity 4.6 and Unity 5? EDIT2 I unistalled Unity 5 and now I can't make object to move even in Unity 4.6. Like it is glued to ground, I can see some force added to object (it shakes a little on top).

Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>