Unity Community


Page 1 of 10 123 ... LastLast
Results 1 to 20 of 195

  1. Location
    USA-VA
    Posts
    244

    Unity Game Development Essentials

    I started this thread for those of us who have picked up Will Goldstone's Unity Game Development Essentials book. This is for observations, problems or discussions on the book.
    Unity 3.0 Pro
    Windows 7
    Unity Script


  2. Location
    USA-VA
    Posts
    244

    Chapter Four - Door Opening Problems

    I have emailed Will on this problem I ran into in Chapter 4 but I thought I would drop it out to the community to comment on or offers solutions.

    In Chapter 4 your have the outpost model and are scripting to be able to open / close the door with character collision.

    I built the script as written and had no errors in it. But when I take my character up to bump into the door nothing happens. I am using the first method, entering the extended boundary of the door.

    Ive attached the script written just in case it is something in the script.
    Attached Files
    Unity 3.0 Pro
    Windows 7
    Unity Script


  3. Posts
    358
    I've only glanced at your source, but Mike asked if I could post:

    onControllerColliderHit needs changing to OnControllerColliderHit
    Hope that helps,


  4. Location
    Princeton, New Jersey
    Posts
    624
    I hit a very similar snag in chapt 4.

    Did Will get back to you? Having a printed section with the final code would have been mighty helpful.

    B.
    Asset Packages & 2D/3D gaming Development
    Unity Pro / iPhone Advanced

    http://outtoplayinc.tumblr.com/


  5. Posts
    70
    You can download all unity packages from all chapters from the packtpub.com site if you login, but I could not find any scripts in them only models, textures, sounds, ...
    In the same location you can find errata but there were none at this time of writing.


  6. Posts
    26
    In Chap. 5 there don't seem to be the battery textures he refers to. Thinking that they may have been mixed into another package, I just imported all of them, but there is no texture folder in any of them. Did anyone else have this problem?


  7. Posts
    26
    I have a question on Ch. 6 that I'm hoping one of you can answer. In the coconut script there is a line
    Code:  
    1. newCoconut.rigidbody.velocity = transform.
    I thought the period at the end was a typo, but I guess it wasn't. I've never seen a line with a period before. Does anyone know why it ends with a period instead of a semicolon?

  8. Unity Fanboy



    Location
    London, UK
    Posts
    455
    Merries, Brendang - Arges is right you're simply missing the starting capital O there. For the rest of you posting in here - the chapters are being redrafted as I right this.. well obivously i've taken a quick break to reply, but otherwise i'm on it. I have several people, some from the Unity team and other trusted Unity experts picking me up on omissions and procedural issues throughout the chapters, so they will be fixed as soon as humanly possible.

    Superherogeek - In Chapter 6 you're misreading the book, there simply isn't enough room on that line for the entire line of code - its all one thing - lines of code end as you point out with a semi-colon, I just check the ebook which I assume you're referring to, you just need the rest of the line there.

    Sorry for the inconvenience to you guys I promise i'm working as fast as I can to finalize these chapters - also working with the publisher to get the assets onto the site - they have all the assets so i'm not sure if / why the battery texture wouldn't be available - please let me know if this is still an issue you're having.

    All the best

    Will


  9. Location
    Princeton, New Jersey
    Posts
    624
    Thanks Will,

    The book, even in it's RAW form, is a terrific learning tool and idea sparker. We're simply getting a preview peek behind the curtain which is a rare thing. I'd much prefer a lil errata here and there than waiting till October for the polished version.

    The one suggestion (plea actually), I'd make is, after a section of assembling code with the 'Now add this to the Bottom, and then add this" approach would be to have what the final script should look like at the end of that section. That way we can troubleshoot ourselves.

    best,
    B
    Asset Packages & 2D/3D gaming Development
    Unity Pro / iPhone Advanced

    http://outtoplayinc.tumblr.com/


  10. Location
    Saint Louis, MO
    Posts
    55
    This book is great! Haven't gotten through very much yet, just wanted to follow this thread.


  11. Posts
    245
    Can't get the door to close completly on the outpost. I don't think it is the script.

    Maybe it come from something else, there is alot of manipulation of the outpost to do.


  12. Posts
    245
    Quote Originally Posted by superherogeek
    In Chap. 5 there don't seem to be the battery textures he refers to. Thinking that they may have been mixed into another package, I just imported all of them, but there is no texture folder in any of them. Did anyone else have this problem?
    Same for me


  13. Location
    Princeton, New Jersey
    Posts
    624
    same here with the door. Think I need a carpenter...
    Asset Packages & 2D/3D gaming Development
    Unity Pro / iPhone Advanced

    http://outtoplayinc.tumblr.com/


  14. Posts
    245
    Quote Originally Posted by brendang
    same here with the door. Think I need a carpenter...
    lol. For the battery I copy the book image and made .jpg out of it and import as new asset. I would post here but I am not sure Will would appreciate?


  15. Posts
    139
    Anyone know where to download the sounds for the ambient music for Chapter 2? Was quite bummed when all I could download was the code off the site.

    EDIT:
    Nevermind.
    Found it in another folder that wasnt chapter 2.


  16. Location
    Toronto, Ontario
    Posts
    45
    I purchased the RAW ebook a couple days ago and I'm finding it very valuable so far...however, I echo some of the sentiments mentioned earlier, most notably:

    1. Not being able to find the battery textures for the GUI. Can't really advance in the book until I get these...

    2. For the outpost, my door doesn't close all the way as well. This isn't major but it'd be worth figuring out what the problem is.

    3. typos typos typos! These aren't major, though

    Finally, I found some of the explanations a bit vague. Most notably when writing the script for the outpost's door activation. I think this would be remedied with that section ending with a full printing of what the whole script should look like, and not just little parts of it.

    Great book! Although the lack of battery PNGs are definitely annoying. They're not part of the battery pack and I've imported all the files on the website.

    Help anyone?


  17. Posts
    245
    Ya some stuff is vague, and the FPC script description is not at right place in the book. Some explanations are clear as water. You can send email to him, hope he change it.

    For the battery you can cut paste images from the book, it look horrible, but it dose the job.
    Or just create 5 images
    0 - 1 - 2 - 3 FULL

    :P


  18. Location
    Toronto, Ontario
    Posts
    45
    Quote Originally Posted by asterix
    Ya some stuff is vague, and the FPC script description is not at right place in the book. Some explanations are clear as water. You can send email to him, hope he change it.

    For the battery you can cut paste images from the book, it look horrible, but it dose the job.
    Or just create 5 images
    0 - 1 - 2 - 3 FULL

    :P
    err.. what page is the picture on? do you mean page 116? where it shows the project view and you can see the tiny thumbnail? That's the only pic I can find :S

    If so, how do you make the (white) background transparent? I'm using GIMP and/or microsoft paint..


  19. Location
    Derby, UK
    Posts
    50
    1. Not being able to find the battery textures for the GUI. Can't really advance in the book until I get these...
    Well yeah I noticed that too but just kinda made my own in PShop; I'm sure the assets package can be updated pretty quickly.

    2.For the outpost, my door doesn't close all the way as well. This isn't major but it'd be worth figuring out what the problem is.
    Yeah here is a problem since we are learning, this could do with fixing; it's I am guessing in the animation? But see that I am guessing... so yes fix needed.



    Finally, I found some of the explanations a bit vague. Most notably when writing the script for the outpost's door activation. I think this would be remedied with that section ending with a full printing of what the whole script should look like, and not just little parts of it.
    I agree that the final code (all of it) should be present at the end of each coding example... for a concise reference.. given


  20. Location
    Derby, UK
    Posts
    50
    Here is my final code for the player script in C# for those who are translating learning

    Code:  
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class PlayerCollisions : MonoBehaviour
    5.    
    6. {
    7.  
    8.     //Declare two public variables for sound clips visible in Unity Inspector to assist assigning door sounds for open / shut in editor
    9.     public AudioClip doorOpenSound;
    10.     public AudioClip doorCloseSound;
    11.  
    12.     // Declare two variables; for a state check 'doorIsOpen' (true or false); and 'doorTimer'
    13.     //to be used to shut the door after an amount of value + Time.deltatime (to keep synced to frame rate) becomes more than 3 secs  
    14.     float doorTimer = 0;
    15.     bool doorIsOpen = false;
    16.    
    17.     // Use this for initialization
    18.     void Start()
    19.     {
    20.         // Nothing to do here yet
    21.     }
    22.  
    23.     // Update is called once per frame
    24.     void Update()
    25.     {
    26.         // Using Raycast technique as to opposed collider checking 'OnColliderHit()' technique that is described in Chapter 4
    27.  
    28.         RaycastHit hit;
    29.         if (Physics.Raycast(transform.position, transform.forward, out hit, 5))
    30.         {
    31.             if (hit.collider.gameObject.tag == "outpostDoor" && doorIsOpen == false)
    32.             {
    33.                 Door(doorOpenSound, true, "dooropen");
    34.             }
    35.         }
    36.  
    37.         if (doorIsOpen)
    38.         {
    39.             doorTimer += Time.deltaTime;
    40.             if (doorTimer > 3)
    41.             {
    42.                 Door(doorCloseSound, false, "doorshut");
    43.                 doorTimer = 0;
    44.             }
    45.         }
    46.     }
    47.  
    48.     /*original if statement calling the method 'shutDoor' for shutting the door after 3 secs,
    49.      * now we use new method 'Door' passing arguments to the method 'Door(AudioClip aClip, bool openCheck, string animName)'
    50.      * to be received as parameters for that method named 'Door'
    51.      *
    52.      if (doorTimer > 3)
    53.         {
    54.            shutDoor();
    55.             doorTimer = 0;
    56.         }
    57. }
    58. */
    59.  
    60. /* TEMP COMMENTED OUT WHILST USING RAYCASTING METHOD IN Update() METHOD INSTEAD
    61. void OnControllerColliderHit (ControllerColliderHit hit)
    62. {
    63.    if (hit.gameObject.tag == "outpostDoor" && doorIsOpen == false)
    64.    openDoor();  
    65.        
    66. }          
    67. */
    68.  
    69.     /* TEMP INACTIVE AS WE REPLACE THE openDoor() METHOD WITH ONE THAT PASSES ARGUMENTS TO PARAMETERS IN THE METHOD 'Door'
    70.   void openDoor()
    71.    {
    72.        audio.PlayOneShot(doorOpenSound);
    73.        doorIsOpen = true;
    74.        GameObject myOutpost = GameObject.Find("outpost");
    75.        myOutpost.animation.Play("dooropen");
    76.    }
    77.    */
    78.  
    79.     // TEMP INACTIVE AS WE REPLACE THE shutDoor() METHOD WITH ONE THAT PASSES ARGUMENTS TO PARAMETERS IN THE METHOD 'Door'
    80.     /*void shutDoor()
    81.     {
    82.         audio.PlayOneShot(doorCloseSound);
    83.         doorIsOpen = false;
    84.         GameObject myOutpost = GameObject.Find("outpost");
    85.         myOutpost.animation.Play("doorshut");
    86.     }
    87.     */
    88.  
    89.     void Door(AudioClip aClip, bool openCheck, string animName)
    90.     {
    91.         audio.PlayOneShot(aClip);
    92.         doorIsOpen = openCheck;
    93.         GameObject myOutpost = GameObject.Find("outpost");
    94.         myOutpost.animation.Play(animName);
    95.     }
    96. }

Page 1 of 10 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •