내가 현재 가지고플라잉 문자
#pragma strict
var cMotor: CharacterMotor; // reference to the CharacterMotor script
function Start(){ // get the CharacterMotor script at Start:
cMotor = GetComponent(CharacterMotor);
}
function Update(){ // move player upwards while F is pressed
if (Input.GetKey("f")){
cMotor.SetVelocity(Vector3.up*10.5);}
else if (Input.GetKey("up")){
cMotor.SetVelocity(Vector3.forward*10.5);
}
else if (Input.GetKey("left")){
cMotor.SetVelocity(Vector3.left*10.5);
}
else if (Input.GetKey("down")){
cMotor.SetVelocity(Vector3.back*10.5);
}
else if (Input.GetKey("right")){
cMotor.SetVelocity(Vector3.right*10.5);
}
else if (Input.GetKey("g")){
cMotor.SetVelocity(Vector3.down*10.5);
}
}
// This do-nothing function is included just to avoid error messages
// because SetVelocity tries to call it
function OnExternalVelocity(){
}
그러나 나는 그들이 떨어지지 않도록 공중에 문자를 동결 할 수 있도록하려면하지만 난 경우 다음 스크립트와 함께 공중에 비행 내 캐릭터 maxFallSpeed를 0으로 설정하면 캐릭터 토큰을 다시 만들 수 없습니다. 어떤 아이디어?
저는 이것이 자바 스크립트라고 생각합니다. 질문에이 태그를 추가 할 가치가 있습니다. –