- Home /
Now I want that when the object appears I press the letter "E" to get him. and I want this object in 3d q appear in the right corner of the screen, to symbolize that I took. gui not want do not want a texture 2d want the object in 3D.
hi guys ... My doubt is the following day.
I have this script in java
Now I want that when the object appears I press the letter "E" to get him. and I want this object in 3d q appear in the right corner of the screen, to symbolize that I took. gui not want do not want a texture 2d want the object in 3D.
var showDistance = 3.0;
private var goPlayer: GameObject;
var ObjectShown: boolean;
function Start () {
ObjectShown = false;
goPlayer GameObject.Find = ("player");
function Update () {
if (Input.GetButton ("Fire1") | | ObjectShown == false) { renderer.enabled = ((goPlayer.transform.position - transform.position). magnitude < showDistance);
ObjectShown = true; }
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
End game then an Object is close to another object? 0 Answers
stop song and play song 0 Answers
Game object position. 1 Answer
Destroy GameObject and play sound 1 Answer