- Home /
constantForce and relativeForce errors.
Hello, I'm a Spanish beginer in unity 3D (using it to make android games) and I want to make some answers for learn more about it. First I have a big problem that I can't resolve anyway, it says that there is no 'Constant Force' attached to the "Cube", please, I try ALL, this is my code:
var Speed = 20;
var MaxSpeed = 1200;
var MinSpeed = 0;
function Update () {
if(Input.GetKey(KeyCode.W))Speed = Speed + 1;
if(Input.GetKey(KeyCOde.S))Speed = Speed - 1;
if(Speed >= MaxSpeed)Speed = MaxSpeed;
if(Speed <= MinSpeed)Speed = MinSpeed:
constantForce.relativeForce.z = Speed;
}
Other Problem is that I want to know some thinks. I saw unity Android Games and It has a menu, how can I make it? And the last problem is that I can build an Android Game becouse I have this error: Assets/Standard Assets/Character Controllers/Sources/Scripts/ThirdPersonController.js(193,54): UCW0003: WARNING: Bitwise operation '|' on boolean values won't shortcut. Did you mean '||'?
I'm Idiot, I always have problems with my work... :(
Comment