Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Space Shooter Tutorial Q&A

Discussion in 'Community Learning & Teaching' started by Adam-Buckner, Mar 26, 2015.

  1. kenanmarasli

    kenanmarasli

    Joined:
    May 14, 2017
    Posts:
    1
    Hi Adam Buckner. I guess you are the one in the videos. Great tutorials so far. I love them.

    A question about user interface and hotkeys:
    In the Creating Hazards section, you rotate the camera (not the in-game camera) around the selected gameobject. In other words, you can scan different angles with the game object in the center. How can you do that? When I right-click and drag, I rotate around the point of myself. I want to rotate around the point of game object.

    Please answer.

    Note: You can find what I am talking about in the video at minute 2, second 45.
     
  2. Deleted User

    Deleted User

    Guest

  3. BartekCompany

    BartekCompany

    Joined:
    May 11, 2017
    Posts:
    5
    Hi, I write code for moving player and it doesn't work. There are 2 errors:
    Unexpected symbol " = " and unexpected symbol " ; ". I don't know why.
    My code is:

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;

    public class PlayerController : MonoBehaviour
    {
    private Rigidbody fizyka;

    void Start ()
    {
    fizyka = GetComponent<Rigidbody>();
    }

    void FixedUpdate ()
    {
    float ruchPoziomy = Input.GetAxis ("Horizontal");
    float ruchPionowy = Input.GetAxis ("Vertical");
    }

    Vector3 ruch = new Vector3 (ruchPoziomy, 0.0f, ruchPionowy);
    fizyka.velocity = ruch;
    }

    Update: Problem solved.The two last lines must be in FixedUpdate. I've missed that.
     
    Last edited: May 14, 2017
    Adam-Buckner likes this.
  4. FearTheSock

    FearTheSock

    Joined:
    Apr 25, 2017
    Posts:
    1
    First of all, great Tutorial, I'm following it after Roll-A-Ball and it's been great.

    Unfortunately, I'm stucked right now on the second part of "Creating Hazards": basically, after having created and assigned to the asteroid the DestroyByContact script, the shots are fired without any problem, but the asteroid itself doesn't get hit, therefore it doesn't disappear.

    These are my scripts:

    Random Rotator
    Code (CSharp):
    1. using System.Collections;
    2. using UnityEngine;
    3.  
    4. public class RandomRotator : MonoBehaviour {
    5.  
    6.     private Rigidbody rb;
    7.     public float tumble;
    8.  
    9.     // Use this for initialization
    10.     void Start () {
    11.         rb = GetComponent<Rigidbody> ();
    12.         // Rotation Speed
    13.         rb.angularVelocity = Random.insideUnitSphere * tumble;
    14.     }
    15.  
    16. }
    DestroyByContact
    Code (CSharp):
    1. using System.Collections;
    2. using UnityEngine;
    3.  
    4. public class DestroyByContact : MonoBehaviour {
    5.  
    6.     void onTriggerEnter(Collider other){
    7.         if (other.tag == "Boundary"){
    8.             return;
    9.         }
    10.         Destroy (other.gameObject);
    11.         Destroy (gameObject);
    12.     }
    13. }

    EDIT: Nevermind, found the problem, didn't put the capital letter on "onTriggerEnter"
     
    Last edited: May 14, 2017
    Adam-Buckner likes this.
  5. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    If you are using a prefab for the asteroid, the position should be set by the SpawnWaves code. Have you checked where you are spawning these hazards?
     
  6. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    First, take a look at the new "interface essentials" videos on the learn site. The overview should describe a number of different ways to view the scene. After that, there are some clues in the docs.

    https://unity3d.com/learn/tutorials/topics/interface-essentials
    https://unity3d.com/learn/tutorials/topics/interface-essentials/interface-overview

    https://docs.unity3d.com/Manual/UnityOverview.html

    Sorry to push you off onto links but I move in the editor without thinking about it now, I'll get it wrong; and I'm on the train answering this on my iPad, so I can't check or test.

    If you hold down a key (alt?), you should rotate around your "focus point". The scene view camera is always focused on some point in the 3 D space. To set the focus point to a game object, select it and use "frame selected" and then use the modifier key.

    Hope that helps.
     
  7. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
  8. Suricatoo_

    Suricatoo_

    Joined:
    May 16, 2017
    Posts:
    1
    Hello there!

    Is there anything i have to do when downloading the Unity Webplayer to get it displayed in the Building Settings?
    (Did i eventually something wrong? Webplayer wasn't installed, so i downloaded it from unity and executed the .exe )
     
  9. ElonExSciVR

    ElonExSciVR

    Joined:
    May 5, 2017
    Posts:
    1
    Any follow up on this? I can add the audio source manually as a work-around but when I drag the clips to a prefab either in the inspector or the project window it instantiates it in my hierarchy and does not add the audio source component to the prefab.
     
  10. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    Hello, I can't find Web Player in Unity Build SEting
     
  11. OboShape

    OboShape

    Joined:
    Feb 17, 2014
    Posts:
    836
    Evening.
    @Suricatoo_ should work for you also allowing you to deploy to web.

    The web player has now been deprecated and is no longer available . If you build for WebGL this will allow you to create a build that can be deployed to web.

    Just change build target to WebGL and it should work just the same
     
    Icupdog and hwz2017 like this.
  12. Halo_Liberation

    Halo_Liberation

    Joined:
    Mar 6, 2017
    Posts:
    26
    its been a while since i have attempted to work with unity. busy with work and all that stuff. anyways i worked my rear end off and finally bought myself a nice new computer ($700) and now waiting to have it built. seeing as how my new computer is mainly for game designing needs i figured i would get back into unity and the C# scripting and as i would have thought.... still stuck and no understanding of what i did... im still on the problem of the asteroids not spawning properly, i also have screenshots of the screen with my codes. i know im a bit of a constant nuisance but any help is greatly appreciated
     

    Attached Files:

  13. OboShape

    OboShape

    Joined:
    Feb 17, 2014
    Posts:
    836
    Evening. When you say not spawning correctly. Can you elaborate on what is / isnt happening?
    Any errors?
    Have all the public variables been given a value in the inspector?
     
  14. Halo_Liberation

    Halo_Liberation

    Joined:
    Mar 6, 2017
    Posts:
    26
    Uuum, well like said im not entirely sure whats going on... the best i can describe that before the tutorial section of counting and displaying points the asteroids would spawn nonstop and everything worked. Once i updated my codes to display points they now refuse to spin and tumble towards me, as in you cant see them because they never spawn on or off screen. I have a few screenshots of my codes if it helps but i cant say anything for sure... while i have a few seconds to ask. Is there a way to download all the C# codes to review? Or at least a way to find them? Because im a very slow learner and having a way to access the codes so i can learn them (or at least the necessities) for future game development would be very helpful. Watching a video and copy cating the tutorial doesn't really work for me because i dont understand the mechanics or any of the basics.
     
  15. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    It's pretty likely that there is an error, and the game itself is not running, thats why it doesn't seem like anything is moving... it isnt.

    If you look at lower left of the Unity editor, on or near the frame that surrounds the editor, you will probably see some kind of error message.


    There is finished code, it is in "SpaceShooter\Assets\_Complete-Game\Scripts" note the directory "_Complete-Game"
    Do NOT simply copy the completed scripts from the "_Complete-Game" folder to the working folder "SpaceShooter\Assets\Scripts".
    There may be an extra namespace and associated brackets and/or the class name may be different from what you & Unity created.

    If you must copy code, do it carefully. Any missing letters, spaces, upper/lower case or punctuation differences will cause errors.
     
  16. BartekCompany

    BartekCompany

    Joined:
    May 11, 2017
    Posts:
    5
    Hello! I have problem with audio. When I want to take explosion_asteroid audio into expolosion_asteroid prefabs, explosion_asteroid (1) appears in hierarchy and doesn't appear in expolosion_asteroid prefab. I tried many times, don't know what to do.
     
  17. HowlinnWolf

    HowlinnWolf

    Joined:
    May 2, 2017
    Posts:
    1
    How can I increase the size of explosion prefabs?
    Increasing Scale doesn't help and changing different variables in Particle System ruins the prefab.
     
  18. xandrew94x

    xandrew94x

    Joined:
    May 23, 2017
    Posts:
    10
    Hello to everyone, i have a small problem. I used the code on the site for the controls of the tank.
    Initially the ship has the y = 10, but when it starts y becomes 0 , going to the same level as the background.
    How can I fix it? thank you.
     

    Attached Files:

  19. Halo_Liberation

    Halo_Liberation

    Joined:
    Mar 6, 2017
    Posts:
    26
    oh, i meant like an entire directory or website that has all of the C# codes so i can review them as a whole. in several videos we are showed how to look them up but i was wondering if there was like a PDF way or anything similar so i can learn them by heart and not be so confused all the time. i really want to learn but im very slow and need constant help which i know is very annoying which is why i want to try studying them. for example i know in newer versions rigidbody is to be represented with rb but other things i am unfamiliar with and still need to learn...
     
  20. Halo_Liberation

    Halo_Liberation

    Joined:
    Mar 6, 2017
    Posts:
    26
    also yes an error code is coming up but its one im not really understanding... i have provided a screenshot of it so you can see it better than a sloppy cellphone picture.
    Screenshot (6).png
     
  21. Halo_Liberation

    Halo_Liberation

    Joined:
    Mar 6, 2017
    Posts:
    26
    im very very sorry i hate to be a spammer but i just figured it out. i forgot to take "score text" and assign it to "game controller" for the GUI text... the asteroids are now working and the score is working perfectly.... like said im very slow to understand and after months of this being a problem i just now figured it out and im very sorry for wasting your time... now i need to move unto the ending the game videos and somehow screw that up so don't worry i will be back unfortunately.
     
  22. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    Hello, I have a little problem. My shots are very slow.
    I have set speed on 20 but shots are moving in lag. It is a problem from my laptop? I have a very bad leptop
     
  23. Halo_Liberation

    Halo_Liberation

    Joined:
    Mar 6, 2017
    Posts:
    26
    back again, but this time its super simple i think... picture provided of course.

    explanation: so i followed the instructions and even rewatched it several times just to understand the concepts, and when everything was done im left with 1 effing error code that is stumping me. im not exactly sure what it means but maybe a more adept scripter will? also True at the bottom says it doesn't exist for the context and also loadedlevel doesn't exist for the context... what does that mean? Screenshot (8).png
     
  24. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    You're missing the last bracket } that closes out the class.
    The bracket at 80 closes the method started at 77.

    But there needs to be one more closing bracket added after line 80 to close the class
     
  25. ApexxCode

    ApexxCode

    Joined:
    Mar 27, 2017
    Posts:
    2
    Hey Adam, thank you very much for the great tutorial series. I am somewhat new to Unity and had a blast following along and creating this project.

    I have done a thread search and found just one issue that is similar to what I am experiencing, and there was a solution to, but not quite an answer as to why it may be occurring. The issue is that the Boundary is actually allowing some of the Bolt Enemy prefabs through. It catches 4-5 then it lets one slip through.

    On another note, I have read other people's comments explaining that the Bolt Enemy prefab rotation on the z-axis follows the rotation of the enemy ship's tilt. I have tried to correct the z-rotation in the Update() as follows:

    WeaponController.cs
    Code (CSharp):
    1. void Update()
    2.     {
    3.         shotSpawnFixed = new Quaternion(shotSpawn.rotation.x, 180, 0, 0);
    4.         shotSpawn.transform.rotation = shotSpawnFixed;
    5.     }


    Maybe you can shed some light on these issues for me?

    Thanks in advance!
     
    Last edited: May 25, 2017
  26. ghhhr

    ghhhr

    Joined:
    Apr 11, 2017
    Posts:
    7

    Thank you. Yes, it worked, I just had to rearrange my project. Now it works and I'm pretty happy of this :) In fact, if you want you can check it on your own. I've uploaded it here: https://drive.google.com/drive/folders/0B0WFnZYflMsveDI4bmNXdWtaek0?usp=sharing (there's no virus, believe me, I don't even no how to create them). If you would have any feedback I would appreciate it very much.

    Now, I came back to Space Shooter to make some things that I've just learned in Quiz Game live sessions. First I wanted to add a Screen Menu. I've made it like in this session with 2 buttons: play and quit. And it works and it's cool, I think I know how to do this in other projects :)

    The second thing in high score table. Once again I used the stuff from Quiz Game. I've made persistent scenewith a Data Controller. Here's the script:

    Code (csharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using UnityEngine.SceneManagement;
    6.  
    7. public class DataController : MonoBehaviour {
    8.  
    9.     private PlayerProgress playerProgress;
    10.  
    11.     void Start()
    12.     {
    13.         DontDestroyOnLoad(gameObject);
    14.         LoadPlayerProgress();
    15.  
    16.         SceneManager.LoadScene("MenuScreen");
    17.     }
    18.  
    19.     public void SubmitNewPlayerScore(int newScore)
    20.     {
    21.         if(newScore>playerProgress.highestScore)
    22.         {
    23.             playerProgress.highestScore = newScore;
    24.             SavePlayerProgress();
    25.         }
    26.     }
    27.  
    28.     public int GetHighestPlayerScore()
    29.     {
    30.         return playerProgress.highestScore;
    31.     }
    32.  
    33.     private void LoadPlayerProgress()
    34.     {
    35.         playerProgress = new PlayerProgress();
    36.  
    37.         if(PlayerPrefs.HasKey("highestScore"))
    38.         {
    39.             playerProgress.highestScore = PlayerPrefs.GetInt("highestScore");
    40.         }
    41.     }
    42.  
    43.     private void SavePlayerProgress()
    44.     {
    45.         PlayerPrefs.SetInt("highestScore", playerProgress.highestScore);
    46.     }
    47. }
    48.  
    And I made a small changes in Game Controller script:

    Code (csharp):
    1.  private DataController dataController;
    in Start() I added in the first line:

    Code (csharp):
    1.  dataController = FindObjectOfType<DataController>();
    and finally in GameOver()
    Code (csharp):
    1.  
    2.     public void GameOver()
    3.     {
    4.         dataController.SubmitNewPlayerScore(score);
    5.         gameOverText.text = "Game Over!\n" + dataController.GetHighestPlayerScore().ToString();
    6.         gameOver = true;
    7.     }
    8.  
    And it works :) But now I would like to make it true leader board. With let's say 10 highest scores, nick and possibility for player to write his nick. My idea to make it is this way:

    1. Show more than one highest score. I think it can be done by changing int highestScore to array of ints and than in DataController in function SubmitNewPlayerScore I would have to write for loop around if that would go through all values stored in array and checking this if.

    2. Show scores with names. I think it would take to change an array to a list or dictionary.

    3. Give the player possibility to write his name. Well, that's kind of "Type III of Kardashev scale" - I know that I want to achieve it but wasn't even thinking how to do it yet.

    I am before point 1. And I wonder - is it possible to do it this way, with PlayerPrefs that you use in Quiz Game? Or maybe I'm on a way of doing something that is not doable like this and should take completely other aproach to this problem?

    Sorry for long text but I wanted to make everything clear. Have a nice day folks!
     
  27. Halo_Liberation

    Halo_Liberation

    Joined:
    Mar 6, 2017
    Posts:
    26
    welp, unity updated and deleted my save file, kinda... i can go into it but all the work i did is gone and its just a blank slate with the project name. looks like im going to either restart or just wait until my new good computer is built and just start all over from the roll a ball tutorial. thats actually kinda depressing... i like unity and the services they provide but seriously the need to update these videos. i have nothing but constant trouble because the videos are out dated and the new stuff is in a PDF file and it doesnt explain the situation very well or at least for me it doesn't. if these videos were updated it would be much more easier for me because just reading how to do it doesn't help me learn, i have to physically see it be done to start to understand it. sigh...
     
  28. saguil20

    saguil20

    Joined:
    May 25, 2017
    Posts:
    1
    I am having trouble getting the boundary xMin/Max and zMin/Max options to appear in the Player Controller script. I have followed the directions to the script in the video exactly however the public variables do not show up as options in the unity engine. I do not have the same issue when implementing the public Speed variable.
     
  29. ApexxCode

    ApexxCode

    Joined:
    Mar 27, 2017
    Posts:
    2
    Is the Public Class Boundary inside the PlayerController.cs file marked as serializable? You can see it in the code below:

    Code (CSharp):
    1. [System.Serializable]
    2. public class Boundary
    3. {
    4.     public float xMin, xMax, zMin, zMax;
    5. }
     
  30. spandario

    spandario

    Joined:
    May 22, 2017
    Posts:
    1
    Hello, I have just decided to take the plunge and start learning after watching hundreds of GDC talks and a life long love of games. I was very excited and able to fix all my mistakes until now.

    I am on lesson 12/13 midway through lesson 12 the asteroid prefabs being spawned by the game controller stopped interacting with the player or the bolts. I looked through my code and compared it to the videos and I did not see any problems. Interestingly if I place an asteroid in the game without it being spawned it works correctly. I have no real idea why this is happening and any help would be greatly appreciated.

    EDIT: the game object was spawning the asteroids above the player but I couldn't tell.

    upload_2017-5-25_20-58-41.png upload_2017-5-25_20-59-9.png
     

    Attached Files:

    Last edited: May 28, 2017
  31. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    pls someone help me..
     
  32. Meldiuz

    Meldiuz

    Joined:
    May 26, 2017
    Posts:
    9
    Hello there :)

    Iv got an issue with the Space Shooter were i can't shoot at all iv tried ctrl , mouse1 and space nothing works so how can i fix it ? is there someway to change your input keys somewere , and what pictures do you guys maybe need to be able to help me ? , very new to this !
     

    Attached Files:

  33. Darzee

    Darzee

    Joined:
    May 21, 2017
    Posts:
    1
    Hello everyone,

    I've made it through the first two sections of tutorial videos, so now I have a working game with asteroids and explosion and all. My only issue is that when the asteroids pass by the ship and exit the game view, the asteroid is destroyed by the boundary trigger but the parent empty game object for the asteroid is not destroyed, and these empty parent objects accumulate as the game is played. I can have them destroyed too by giving the parent its own smaller collider (as a trigger), however the tutorial doesn't mention this and the "done" asteroid prefab doesn't have one. Has anyone else experienced this?
     
  34. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    The method name at line 23 should be "Update" with a capital "U"
    There may be other issues
     
  35. martin31

    martin31

    Joined:
    May 25, 2017
    Posts:
    2
    I had the same problem (my shots were moving slowly and jumping, not moving smoothly), but now I've fixed it, and here's how I did it, though I'm just a beginner, so I have no idea which step (if any) actually fixed the problem!

    First, I started the whole section again (the 6th video - Creating Shots), after deleting the Bolt and VFX files in the Assets directory and deleting the "Mover" script.
    Then I re-watched the video, very carefully, pausing many times and following the steps exactly. There are about three things I did differently this time:
    1. I made sure I dragged the fx_bolt_orange MATERIAL (NOT the TEXTURE) onto the quad. (I also noticed that the fx_bolt_orange material was already there in the materials folder, so I didn't have to do all those extra steps in the video.
    2. Before creating the script for the Bolt, I made sure I had highlighted the BOLT in the hierachy before clickiing "add component" etc., NOT the VFX.
    3. I used the following script for the Mover script, and here it is:

    public float speed;

    void Start()
    {
    GetComponent<Rigidbody> ().velocity = transform.forward * speed;
    }

    Hope that helps, and I would be interested to know if it does!
     
  36. Tempest74

    Tempest74

    Joined:
    May 17, 2017
    Posts:
    133
    It doesn't work, after a ton of time and a ton of other question and prifile my game i realize that my PC is too slow
     
  37. martin31

    martin31

    Joined:
    May 25, 2017
    Posts:
    2
    Try this:

    select explosion_asteroid in explosions file in the project window
    then select 'add component' in the inspector, then select 'audio' then 'audio source'.
    Now drag the audio file called explosion_asteroid from the project window onto the 'audio clip' bar in the inspector (where
    it says "none (audio clip)"
    You can do the same for explosion_player.
    For weapon_player, follow the instructions in the video.
     
    Piquan and BartekCompany like this.
  38. Meldiuz

    Meldiuz

    Joined:
    May 26, 2017
    Posts:
    9
    Thx man , thx to you i managed to fix some other issues as well ^^ thx allot and take care :D
     
  39. BartekCompany

    BartekCompany

    Joined:
    May 11, 2017
    Posts:
    5
    Thx Martin31, it works now :) But I choose in Build Settings PC, Mac & Linus Standalone. When I choose WebGL like in tutorial, audio files don't work, their icons are white, empty.
     
  40. Meldiuz

    Meldiuz

    Joined:
    May 26, 2017
    Posts:
    9
    Hello there again iv followed the Creating Hazards part of the tutorial for space shooter and iv run in to a new problem iv tagged the boundary as stated in the tutorial and i have made the script as the tutorial said i should do it, But my asteroid still disappear il post screens of what iv done and maybe you guys will see something iv overlookt maybe ? DestroyContact.jpg BounderyTagged.jpg
     
  41. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    Mel- the tag name you are checking in the C# code is spelled "Boundary", while the tag name you created and assigned in Unity is spelled "Boundery".
     
    Last edited: May 29, 2017
    Meldiuz likes this.
  42. BartekCompany

    BartekCompany

    Joined:
    May 11, 2017
    Posts:
    5
    I have new problem with displaying text. Score Text in position (0,1,0) appears in the corner of the game view, not in the corner of the background like in tutorial.
    score texte.png
     
  43. gwnguy

    gwnguy

    Joined:
    Apr 25, 2017
    Posts:
    144
    There is a row along the top of your game window that contains:
    "Display 1 Free Aspect Scale " then the scale slider, then other settings

    Click on "Free aspect" and change it to a different value.
    For example, mine is set to "Standalone (600x900)"
     
    lauravc69 and BartekCompany like this.
  44. Meldiuz

    Meldiuz

    Joined:
    May 26, 2017
    Posts:
    9
    thx man =)
     
  45. dylanm312

    dylanm312

    Joined:
    May 31, 2017
    Posts:
    3
    Before I build the project, the whole game works correctly. After I build the project, however, I get the following error in my PlayerController script, "error CS0246: The type or namespace name `NUnit' could not be found. Are you missing an assembly reference?". Once I've attempted to build the project, I can no longer play it until I quit and restart Unity. Any thoughts on how to fix this?
     
  46. Rezyaev

    Rezyaev

    Joined:
    May 23, 2017
    Posts:
    4
    Hello everybody. I have a very small question. Is there efficiency's difference between my code and the code in assignment ? (tag check code)
    Code (CSharp):
    1. void OnTriggerEnter(Collider another) {
    2.  
    3.         if (another.tag != "Boundary")
    4.         {
    5.             Destroy (another.gameObject);
    6.             Destroy (gameObject);
    7.         }
     
  47. dylanm312

    dylanm312

    Joined:
    May 31, 2017
    Posts:
    3
    I don't believe so. You are performing the same number of checks either way.
     
  48. Kainatic

    Kainatic

    Joined:
    May 31, 2017
    Posts:
    5
    Hey,
    I am having a little problem...in the 'tumble' part of the 'Creating Hazards' section, I got the asteroid rotating or tumbling but with a change in 'position' too i.e. both the 'Position' & 'Rotation' fields change values. I have checked everything from the script to the editor but couldn't find the problem and now it's been 2 hours, I am literally frustrated!
    Please help!!
    P.s. I use Unity v5.
    (Screenshots of inspector & script included)

    The Script (RandomRotator):-
    Code (RandomRotator).JPG

    The Child (Artwork):-

    Inspector 2.JPG

    The Parent (Logic):-

    Inspector.JPG

    Some Random Snippets from Play Mode while Testing (Note the Position Fields):-

    Transform 2.JPG Transform.JPG

    EDIT: I found a part of the problem...it is the 'Capsule Collider' which is causing this. I was experimenting with the elements to find the problem and "tumbled" upon the 'Is Trigger' checkbox. When I selected it, the position attribute remained as it is. Also, when I deselected the 'View Element' checkbox (was used in the tutorials to hide the player ship), the result was positive i.e. position attribute remained intact. Maybe with this information, you all could help me more. Thanks.
     
    Last edited: Jun 1, 2017
  49. Meldiuz

    Meldiuz

    Joined:
    May 26, 2017
    Posts:
    9
    Hello again iv encounterd something that left me a bit confused to be honest.

    im following the tutorial on howto Ending the Game , but wen im scripting the condition for Input keyCode for R it dosen't accept the old one, and thats okey but it dosen't accept the one in the newer reference ither so i could use some help :) SceneManager.jpg
     
  50. ZTB

    ZTB

    Joined:
    Mar 16, 2017
    Posts:
    5
    How to I change the aspect in game view to web? I already have it set to WebGL on build settings, and fixed the resolution.