Unity Community


Page 4 of 11 FirstFirst ... 23456 ... LastLast
Results 61 to 80 of 209

  1. Posts
    5
    Here is a Question Pleez Help
    its about RunMode/WalkMode Switch..
    http://forum.unity3d.com/threads/142...ts...?p=977862


  2. Posts
    2
    Hey,


    I haven't made a thread, because this is just a small problem, but when I right click the gun only moves a tiny bit, and ends up nowhere near the middle of the screen. Any help would be appreciated. Thanks,


    Joe


  3. Posts
    4

    FPS 1.6 SmoothDamp.Angle Error with NaN & Infinity results

    Hi Eeteeski,

    First off, I can't thank you enough for your work on these tutorials. Total lifesaver!

    Episode: FPS 1.6

    Issue: I'm having an issue with the Mathf.SmoothDamp() function. I am receiving this error:
    rigidbody.velocity assign attempt for 'PlayerCapsule' is not valid. Input position is {NaN, -0.196200, 0.00000}
    rigidbody.velocity assign attempt for 'PlayerCapsule' is not valid. Input position is {0.00000000, -0.196200, NaN}
    I'm not sure why those variables are returning as not numbers, i've gone over the code several times to ensure there aren't any spelling errors or differences in variable values. I made sure all the variables in the inspector were the same as the video.

    My code in reference to error:
    Code:  
    1. var walkAccel:float = 100;             
    2. var walkAccelAirRatio:float = 0.1;     
    3. var walkDeAccel:float = 5;             
    4. var cameraObject:GameObject;           
    5. var maxWalkSpeed:float = 20;       
    6. @HideInInspector                       
    7. var walkDeAccelVolx:float;
    8. @HideInInspector
    9. var walkDeAccelVolz:float;
    10. var horizMovement:Vector2;             
    11. @HideInInspector
    12. var grounded:boolean = false;          
    13. var maxSlope:float = 60;               
    14. var jumpVelocity:float = 250;          
    15.  
    16. function Update () {
    17.  
    18. horizMovement = Vector2(rigidbody.velocity.x, rigidbody.velocity.z);
    19.    
    20.     if(horizMovement.magnitude > maxWalkSpeed){
    21.         horizMovement = horizMovement.normalized;
    22.         horizMovement *= maxWalkSpeed;
    23.     }
    24.  
    25. if(grounded){
    26.     rigidbody.velocity.x /= Mathf.SmoothDamp(rigidbody.velocity.x, 0, walkDeAccelVolx, walkDeAccel);
    27.     rigidbody.velocity.z /= Mathf.SmoothDamp(rigidbody.velocity.z, 0, walkDeAccelVolz, walkDeAccel);
    28. }   
    29. }

    Link to my question thread: http://forum.unity3d.com/threads/144...640#post985640
    Last edited by compugraphx; 07-17-2012 at 12:00 PM.


  4. Location
    West Midlands
    Posts
    5
    Hey,
    Having trouble with FPS1.8 Basic Gun with Weight.

    When I use my modified code, my torch rotates with my camera but doesn't move with it

    I'd appreciate anyone taking a look:
    http://forum.unity3d.com/threads/144...023#post988023

    Thanks.
    Last edited by venhip; 07-19-2012 at 05:42 PM.
    "Now you on the other hand have at least a passing resemblance to a cow." The three women behind her suppressed a snort.

    "What did you say?" Growled the woman angrily.

    "Moo." Replied Nabiki.
    __________________________________________________ _____________________

    Fenrir Studios:
    Graphics, Renders and Vectors


  5. Posts
    2
    FPS1.18

    When I test out the script the gun isn't anywhere near the player capsule its way off to the side.

    Here is my thread : http://forum.unity3d.com/threads/144...559#post988559
    Last edited by clownwiz1; 08-02-2012 at 03:16 PM.


  6. Posts
    25

    fps 1.1.3

    In fps 1.1.3 i try to follow everything you say to do,The problem is the bullethole does not appear. all my objects are set up and tagged, i am however using a meshed terrain. Do i need to tag it diffrently? here is the code i have also used :

    Thread : http://forum.unity3d.com/threads/146...272#post999272


    I hav no errors at all.
    Last edited by aldian; 08-02-2012 at 12:52 PM.


  7. Posts
    4
    FPS 1.26

    My gun is in the wrong place at the start of the game, but after reloading it moves to it's proper spot.

    A link to my thread Here.

    Thanks
    Last edited by zipson1; 08-10-2012 at 08:50 PM.


  8. Posts
    4
    I fixed this problem, but can't figure out how to get rid of the post... Sorry.


  9. Location
    Miami, FL
    Posts
    1
    I have a problem with FPS 1.4 where we set a max walk speed. I followed the instructions and typed the new parts of the code exactly as you did. but in the end when I press play to test it out the console displays an error message that says

    MissingFieldException: Field 'UnityEngine.Vector2.z' not found.

    What went wrong? How do I fix this issue in order to continue. I would greatly appreciate it if you could reply to this message and help me


  10. Location
    Michigan USA
    Posts
    460
    Quote Originally Posted by mauro_rmp View Post
    I have a problem with FPS 1.4 where we set a max walk speed. I followed the instructions and typed the new parts of the code exactly as you did. but in the end when I press play to test it out the console displays an error message that says

    MissingFieldException: Field 'UnityEngine.Vector2.z' not found.

    What went wrong? How do I fix this issue in order to continue. I would greatly appreciate it if you could reply to this message and help me
    maybe there's something wrong with my code, I'll look into it. I've been getting a lot of people with the same error. but vector2's dont have a Z only X and Y. either change the z to a y or change it to a vector3.
    My Youtube Channel - youtube.com/ETeeskiTutorials
    My Website - ETeeskiTutorials.com
    Texture Pack - 100 tiled textures for level design, all 2048x2048 - Asset Store - WebPlayer Demo


  11. Posts
    1
    Its a quick question, so i did not make a thread.
    I have a sprinting code in my player move script that increases the acceleration and max speed.
    is there a way that i can rotate my gun object in the script when i sprint?


  12. Posts
    6
    FPS 1.36 AI following issue

    Hello! I'm having an issue where the enemy won't follow my player from one cell to the next. As soon as I move from their cell or jump, they ignore me. When I land from jumping they come towards me, but when not in their cell they just ignore me.

    My personal thread here.


  13. Location
    Michigan USA
    Posts
    460
    Quote Originally Posted by KRAZEEnRECKLESS View Post
    Its a quick question, so i did not make a thread.
    I have a sprinting code in my player move script that increases the acceleration and max speed.
    is there a way that i can rotate my gun object in the script when i sprint?
    animations would probably be the best way. or you could make the gun model a child of another child and change that local rotation depending on wether or not the player is sprinting.
    My Youtube Channel - youtube.com/ETeeskiTutorials
    My Website - ETeeskiTutorials.com
    Texture Pack - 100 tiled textures for level design, all 2048x2048 - Asset Store - WebPlayer Demo


  14. Posts
    1
    I have problem after epizode 34... maybe somebody can resolve it...
    NullReferenceException: Object reference not set to an instance of an object
    Boo.Lang.Runtime.RuntimeServices.InvokeBinaryOpera tor (System.String operatorName, System.Object lhs, System.Object rhs)
    EnemyMovementScript.Update () (at Assets/Script/EnemyMovementScript.js:23)

    Code:  
    1. var currentCell : GameObject;
    2. var playerMovementScript : PlayerMovementScript;
    3. var playerCell : GameObject;
    4. var goalDoor : GameObject;
    5. var shortestPathSoFar :float;
    6. @HideInInspector
    7. var waitToStart : int = 5;
    8.  
    9. function Awake ()
    10. {
    11.     ShortestPathSoFar = Mathf.Infinity;
    12.     playerMovementScript = GameObject.FindWithTag("Player").GetComponent(PlayerMovementScript);
    13.     waitToStart = 5;
    14. }
    15.  
    16. function Update ()
    17. {
    18.     if (waitToStart <= 0)
    19.     {
    20.         playerCell = playerMovementScript.currentCell;
    21.         for (var doorCheckingNow : GameObject in currentCell.GetComponent(AICellScript).doors)
    22.         {
    23.             for (var i : int = 0; i <= doorCheckingNow.GetComponent(AIPathDoorScript).cells.lenght -1; i++)
    24.             {
    25.                 if (doorCheckingNow.GetComponent(AIPathDoorScript).cells[i] == playerCell)
    26.                 if (doorCheckingNow.GetComponent(AIPathDoorScript).doorsToCells[i] < shortestPathSoFar)
    27.                 {
    28.                     goalDoor = doorCheckingNow;
    29.                     shortestPathSoFar = doorCheckingNow.GetComponent(AIPathDoorScript).doorsToCells[i];
    30.                 }
    31.             }
    32.         }
    33.         shortestPathSoFar = Mathf.Infinity;
    34.     }
    35.     waitToStart -= 1;
    36. }
    37.  
    38. function OnTriggerStay (hitTrigger : Collider)
    39. {
    40.     if (hitTrigger.tag == "AIpathCell")
    41.         currentCell = hitTrigger.gameObject;
    42. }
    Last edited by Marchello; 09-08-2012 at 07:53 PM.


  15. Posts
    12
    Problem with 1.8 Basic Gun with Weight

    On my Gunscript everything works great but a gun do not have good smooth, its jitter. I tried to put the whole code in LateUpdate() and just targetXRotation, targetYRotation in LateUpdate() but gun still has the jitter. When I put targetXRotation, targetYRotation in LateUpdate() a gun have smaller jitter but it still have. Can anyone help on this problem? Master how to solve this? Is it up to my pc that is slow. Maybe is framerates? Please help the teacher. Btw. Your videos is great. I like that you go in so details.

    http://forum.unity3d.com/threads/150...08#post1031108


  16. Posts
    15
    1.5 Jumping the right way problem

    I followed all the steps but doesn't jump on the terrain

    My thread:
    http://forum.unity3d.com/threads/150...16#post1031316


  17. Posts
    3

    My problem at FPS1.8

    i got a problem at episode FPS1.8
    when i try to move i cant move, and when i look around it blocks it, but when i look around the capsule location changes, the camera and gun stay on the same location all the time
    this only happends when i enable the gunscript
    also, the scene screen starts movinf once a start the game with the gunscript, even though i dont do anything, while he game is just stuck

    Thread: here

    iif you need to know the Move script, just say it, but its not special at all
    Last edited by lenis0012; 09-16-2012 at 01:24 AM. Reason: made smaller and made format good


  18. Posts
    8
    Anyone else getting jumps at half speed when close to a wall / box etc?


  19. Location
    Michigan USA
    Posts
    460
    Quote Originally Posted by peladovii View Post
    Anyone else getting jumps at half speed when close to a wall / box etc?
    yeah, that's because of using a rigidbody for the player. one way to help with that is to add a physic material to the player that has no friction on it.
    My Youtube Channel - youtube.com/ETeeskiTutorials
    My Website - ETeeskiTutorials.com
    Texture Pack - 100 tiled textures for level design, all 2048x2048 - Asset Store - WebPlayer Demo


  20. Posts
    3

    Please help


    OK IM REALLY ANGRY THAT I CAN'T GET THIS PROBLEM FIXED. I HAVE BEEN TRYING BY MY OWN FOR 2 WEEKS. THE 1.13 VID THERE IS NO BULLET HOLE AND WHEN IT MAKES THE BULLET IT'S MAKES A EMPTY GAME OBJECT. PLEASE HELP.

Page 4 of 11 FirstFirst ... 23456 ... 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
  •