Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink
Share
Go down
Member [Lv. 3]
Member [Lv. 3]
Posts : 15
Points : 1669
Rep : 0
Join date : 2014-01-22
View user profile

Need Help. Code Doesnt Work.

on Sat Feb 01, 2014 6:12 am
hello... i have a cube in my project and i made this script to make him move forward... i fixed the "Axes" i applied the script to my player... all corect... but when i press play and i click w it doesnt move! ! why?

thats my code


Code:
#pragma strict

var moveSpeed : float;

function Start () {

}

function Update () {
if(Input.GetButton("Forward")) {
  transform.Translate(transform.forward * moveSpeed * Time.deltaTime);
  }
}
Member [Lv. 3]
Member [Lv. 3]
Posts : 15
Points : 1669
Rep : 0
Join date : 2014-01-22
View user profile

Re: Need Help. Code Doesnt Work.

on Sat Feb 01, 2014 12:39 pm
PROBLEM SOLVED
avatar
Moderator
Moderator
Posts : 194
Points : 1994
Rep : 44
Join date : 2013-12-30
View user profile

Re: Need Help. Code Doesnt Work.

on Sat Feb 01, 2014 6:57 pm
May you please write what was the problem, just if anyone else experiences this same problem they would know what to do.

--New Developer
Member [Lv. 3]
Member [Lv. 3]
Posts : 15
Points : 1669
Rep : 0
Join date : 2014-01-22
View user profile

Re: Need Help. Code Doesnt Work.

on Sun Feb 02, 2014 6:41 am
NewDeveloper wrote:May you please write what was the problem, just if anyone else experiences this same problem they would know what to do.

--New Developer

i didnt had colour to my terain so my player at reality was moving but i coudnt see it in the screen cause terain was black... i had puted a directional light at full dark so... that was the prob
Back to top
Permissions in this forum:
You cannot reply to topics in this forum