Unity Community


Page 1 of 9 123 ... LastLast
Results 1 to 20 of 175

  1. Location
    Michigan USA
    Posts
    455

    ETeeskiTutorials FPS1 Problem Diagnostic Collaboration Thread

    youtube.com/ETeeskiTutorials
    Click Here to go to the FPS1 Tutorial Playlist

    This video explains the idea of this thread:


    This is the ETeeskiTutorials FPS1 Problem Diagnostic Collaboration Thread, a place for all viewers of ETeeskiTutorials to come together and help each other out with any problems/glitches that arise while trying to complete the FPS1 project. This will be a place to post what episode you are currently on, a brief description of your problem, and a link to your own thread (posted by you and dedicated to your particular problem/glitch).
    Posting your glitches here on the Unity forums will be much more effective than on youtube. Here you will be able to show your scripts, post screen shots, post up a zip file of your project, and generally just keep things more organized.
    Be sure so scroll through other people's posts here; Someone else might have had the same problem as you, or you may find someone who is having a problem that you figured out last week.
    I will still personally try to respond and help everyone with what ever problems they are having, and I think I will be able to do this more effectively on the forums.
    In order for this thread to work and be effective, we will need to stay organized. Once again here are the three things your posts here will need:


    POSTS ON THIS THREAD SHOULD CONTAIN:

    1. What episode you are currently on - FPS1.3 Basic walking/running, FPS1.4 Setting the max walk speed, etc. Make sure that in addition to the episode number, you also include the title. I was the one that made these tutorials and I don't even remember which tutorials are which.

    2. A brief description of your problem/glitch - Try to keep this short and to the point. It will be easier for everyone to find solutions to their problems if they can read the descriptions quickly. Your personal thread is where you want to add lots of detail.

    3. IMPORTANT! A link to your personal thread for your problem/glitch - Things will get extremely confusing if people try helping other people on this thread. We need a separate thread for each problem/glitch. So, before you post in this thread, make your own thread. That way, you will be able to copy and paste the URL into this thread so people can easily find it.

    YOUR PERSONAL THREAD:
    Make sure, before you post in this thread, you create your own. Most likely you'll want to post it in the scripting section of the unity forums. It might also be a good idea to, either in the title or in the body of your thread, include key words like ETeeskiTutorials or FPS1 so that other ETeeskiTutorial views can find your thread in a search. Remember though, there are a lot of people here on the forums who have never heard of ETeeskiTutorials, so make sure you describe your problem/glitch in a way that will be understood by people who have never watched my tutorials. A link to one of the videos and a specific time in the video (example @11:52) could be very helpful for people to help you.


    The first post after this one will be an example following these three steps. For this example, I will be using a common problem I've seen some people have.
    I hope this thread works out and creates a more efficient system for solving everyone's problems/glitches.
    As always, have a great day and keep making games!
    Last edited by eteeski; 03-05-2012 at 12:29 AM.
    My Youtube Channel - youtube.com/ETeeskiTutorials
    My Website - ETeeskiTutorials.com
    Texture Pack - 100 tiled textures for level design, all 2048x2048 - Asset Store - WebPlayer Demo


  2. Location
    Michigan USA
    Posts
    455
    (EXAMPLE POST)

    FPS1.9 Aiming

    My gun goes through the camera when I aim. How do I move the gun forward when I aim?

    Link to my thread - http://forum.unity3d.com/threads/126...d=1#post850173
    My Youtube Channel - youtube.com/ETeeskiTutorials
    My Website - ETeeskiTutorials.com
    Texture Pack - 100 tiled textures for level design, all 2048x2048 - Asset Store - WebPlayer Demo


  3. Location
    Newcastle Upon Tyne, UK
    Posts
    72
    Hi,
    Great tutorials

    FPS1.19

    When walking with the headbob script my gun is going crazy shaking all over the place.

    I've changed Update to LateUpdate but it's still shaking when I walk


  4. Location
    South Africa
    Posts
    152

    Camera shake

    Hey im replying to your comment on the youtube video 1.23, im TheHellhound17

    My camera shakes like crazy when i walk but the weapons swaps fine and thats all working.
    My scripts are on this post

    http://forum.unity3d.com/threads/126...161#post852161


  5. Location
    Michigan, USA
    Posts
    1
    How about a tutorial on how to create a first-person camera conversion to third person camera. Using the scroll wheel to move between them or automated for "cut" sequences?


  6. Posts
    6
    FPS1.31 Stairs. Unity3D FPS Game Design Tutorial.

    stair colliders not working when i go through them backwards.

    link to my thread - http://forum.unity3d.com/threads/126...258#post854258


  7. Posts
    20
    I'm currently working of a true FPS. I use your scripts Eteeski and another guy's totorial.

    I have a problem with moving my character rig were the camera is facing.

    THREAD ----------------------------------->>>>>>>>> http://forum.unity3d.com/threads/126...523#post855523


  8. Posts
    3
    FPS 1.8

    i have a strange proble when aiming left to right;

    http://forum.unity3d.com/threads/127...507#post859507


  9. Location
    United States
    Posts
    7
    FPS 1.8 Basic Gun With Weight

    Two Issues: My variables for the gun's position were screwed up and when I added the rest of the code the gun changes position on the z axis when I look up/down. PLEASE HELP

    http://forum.unity3d.com/threads/127...647#post863647


  10. Location
    Puerto Rico
    Posts
    4
    FPS 1.23 Swiching Guns

    the problem with my code its that not switching guns and its saing some mesage like
    null reference and stuff

    http://forum.unity3d.com/threads/128...674#post865674


  11. Location
    Puerto Rico
    Posts
    4

    problem with switching guns

    FPS 1.23 Swiching Guns

    the problem with my code its that not switching guns and its saing some mesage like
    null reference and stuff

    http://forum.unity3d.com/threads/128...674#post865674


  12. Posts
    1
    I have a problem! on the tutorial: FPS1.19 Headbob Movement. Unity3D FPS Game Design Tutorial.

    The problem is that on every variable I make it has 2 errors on them, one saying unexpected symbol Colon and one saying unexpected symbol Equal.

    Can anyone help me? Heres the linc:

    http://answers.unity3d.com/questions...e-problem.html


  13. Posts
    1
    FPS 1.30 Opening and Closing Doors

    the problem is that it doesnt open the door or hear sounds when i press E while i get no error.

    Thread : http://answers.unity3d.com/questions...ing-doors.html


  14. Posts
    6
    What video covers the UseKey script, which supposedly is in the video dealing with picking up guns?. A video I haven't been able to find. Quick help would be much appreciated, as I'm kind of on a deadline here and this one little thing is hanging me up.


  15. Posts
    8

    FPS1.24 Rotating screen

    My gun has sort of a jittering motion? If that makes sense. The gun jumps left and right slightly when I rotate the screen and it does it more profusely when I move forward and rotate. And I skipped 1.23 and went to 1.24 because I wanted to do some stuff but didn't have enough time for a long vid, so I did 1.24 and then did 1.23

    EDIT: Also I didn't add the script because I don't think it has to do with my script. I will if you tell me to. And changing the layer from guns doesn't change anything

    Link: http://forum.unity3d.com/threads/129...783#post874783
    Last edited by YourSeedyUncle; 03-27-2012 at 02:54 AM.


  16. Posts
    4

    Generic Question

    Hi ETeeski,

    I have a generic question, of something I noticed while using my imported gun model.

    For some reason, when I am zoomed out the Raycast is not centered on screen. At least, that's what I think as the bulletHole object gets created off center to the right.

    When aiming it's all perfect. It lines up perfectly with the gun. Just as soon as I am zoomed out the bullets are offset to the side.

    Is this something I can fix in code? Or something that I have to fix in the Inspector?

    I have my gun's local coordinates at x: 0, y: 0, and z: 0.75.

    My thread can be found here http://forum.unity3d.com/threads/129...420#post876420, where you can also find a link to a early iteration of my FPS which seems to be having the same issue.


  17. Location
    Zaragoza, Spain
    Posts
    6

    FPS1.11 Lerp and SmoothDamp at once

    Hi ETeeski,
    first thank you very much for these instructive tutorilas. In FPS1.11, I'd like to understand why we use - as in other parts of the code - both smoothDamp and Lerp to get a smooth transition. ¿Wouldn't be enough to smoothDamp between both camera FOVs?
    My thread: http://forum.unity3d.com/threads/129...eski-Tutorials


  18. Posts
    4
    Another generic Gameplay question: When pressing both A+S or A+W or D+S or D+W (ergo: Horizontal & Vertical movement at the same time) the character walks diagonally at twice the speed it is allowed to move, even though the maxWalkSpeed is set.

    Is there a way to always limit the movement speed to maxWalkSpeed? Even if multiple keys are pressed?


  19. Location
    Gold Coast, Australia
    Posts
    123

    Stair troubles using a capsule collider and a rigidbody

    Hey,
    For my character he is using a capsule collider and rigid body for a movement motor.
    i know you have a tutorial for stairs but that doesn't apply for the capsule collider and rigid body.
    Is there any way to edit the following script to create like a step offset?

    Code:  
    1. var crouchSpeed = 2.0;
    2. var walkSpeed = 8.0;
    3. var runSpeed = 20.0;
    4.  
    5. var fallDamageMultiplier : int = 2;
    6. var fallAnimGO : GameObject;
    7. var inAirControl = 0.1;
    8. var gravity = 20.0;
    9. var maxVelocityChange = 10.0;
    10. var canJump = true;
    11. var jumpHeight = 2.0;
    12. var fallSound : AudioClip;
    13. var playerWeapons : GameObject;
    14.  
    15. var grounded = false;
    16. private var sliding : boolean = false;
    17. private var speed = 10.0;
    18. private var limitDiagonalSpeed = true;
    19. private var crouching : boolean;
    20. private var normalHeight : float = 0.5;
    21. private var crouchHeight : float = -0.2;
    22. private var crouchingHeight = 0.3;
    23. private var hit : RaycastHit;
    24. private var myTransform : Transform;
    25. private var rayDistance : float;
    26. private var mainCameraGO : GameObject;
    27. private var weaponCameraGO : GameObject;
    28.  
    29. @script RequireComponent(Rigidbody, CapsuleCollider)
    30.  
    31. function Awake (){
    32.     rigidbody.freezeRotation = true;
    33.     rigidbody.useGravity = false;
    34.     myTransform = transform;
    35.     mainCameraGO = gameObject.FindWithTag("MainCamera");
    36.     weaponCameraGO = gameObject.FindWithTag("WeaponCamera");
    37.     rayDistance = collider.height * .5 + collider.radius;
    38.     playerWeapons.animation.wrapMode = WrapMode.Loop;
    39. }
    40.  
    41. function FixedUpdate (){
    42.     if (grounded){         
    43.         var inputX = Input.GetAxis("Horizontal");
    44.         var inputY = Input.GetAxis("Vertical");
    45.         var inputModifyFactor = (inputX != 0.0 && inputY != 0.0 && limitDiagonalSpeed)? .7071 : 1.0;
    46.        
    47.         if (Physics.Raycast(myTransform.position, -Vector3.up, hit, rayDistance)) {
    48.             if (Vector3.Angle(hit.normal, Vector3.up) > 30){
    49.                 sliding = true;
    50.                 rigidbody.AddRelativeForce (-Vector3.up * 500);
    51.             }else{
    52.                 sliding = false;
    53.                
    54.             }   
    55.         }
    56.  
    57.         // Calculate how fast we should be moving
    58.         var targetVelocity = new Vector3(inputX * inputModifyFactor, 0.0, inputY * inputModifyFactor);
    59.         targetVelocity *= speed;   
    60.        
    61.         // Apply a force that attempts to reach our target velocity
    62.         var velocity = rigidbody.velocity;
    63.         var velocityChange = (targetVelocity - velocity);
    64.         velocityChange.x = Mathf.Clamp(velocityChange.x, -maxVelocityChange, maxVelocityChange);
    65.         velocityChange.z = Mathf.Clamp(velocityChange.z, -maxVelocityChange, maxVelocityChange);
    66.         velocityChange.y = 0;
    67.         rigidbody.AddForce(velocityChange, ForceMode.VelocityChange);
    68.    
    69.        
    70.         if (canJump && Input.GetButton("Jump")){
    71.             rigidbody.velocity = Vector3(velocity.x, CalculateJumpVerticalSpeed(), velocity.z);
    72.         }
    73.        
    74.         if(!crouching){
    75.             if (grounded && Input.GetButton("Run") && Input.GetKey("w"))
    76.                 speed = runSpeed;
    77.                 else
    78.                 speed = walkSpeed;
    79.             }else{
    80.             speed = crouchSpeed;
    81.         }
    82.    
    83.     }else{
    84.    
    85.         // AirControl
    86.         targetVelocity = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
    87.         targetVelocity = transform.TransformDirection(targetVelocity) * inAirControl;
    88.         rigidbody.AddForce(targetVelocity, ForceMode.VelocityChange);
    89.     }
    90.  
    91.     // Gravity
    92.     rigidbody.AddForce(Vector3 (0, -gravity * rigidbody.mass, 0));
    93.     grounded = false;
    94. }
    95.  
    96. function OnCollisionStay (col : Collision){
    97.     if (Physics.Raycast(myTransform.position, -Vector3.up, hit, rayDistance)) {
    98.         grounded = true;
    99.     }   
    100. }
    101.  
    102. function HitJumpPad(velocity: float) {
    103.        rigidbody.velocity.z += velocity;
    104.     }
    105.  
    106. function OnCollisionEnter (collision : Collision){
    107.     if(!grounded){
    108.         fallAnimGO.animation.CrossFadeQueued("Fall", 0.3, QueueMode.PlayNow);
    109.         var currSpeed : float = collision.relativeVelocity.magnitude;
    110.        
    111.         if (currSpeed > 20) {
    112.             var damage : float = currSpeed * fallDamageMultiplier;
    113.             Debug.Log ("FallDamage" + damage);
    114.             SendMessage ("PlayerDamage", damage, SendMessageOptions.DontRequireReceiver);
    115.         }   
    116.     }   
    117. }
    118.  
    119. function CalculateJumpVerticalSpeed (){
    120.     return Mathf.Sqrt(2 * jumpHeight * gravity);
    121. }
    122.  
    123. function Update(){
    124.  
    125.     if (grounded && rigidbody.velocity.magnitude < (walkSpeed+2) && rigidbody.velocity.magnitude > (walkSpeed-2) && !Input.GetButton("Fire2")){
    126.         playerWeapons.animation.CrossFade("Walk");
    127.        
    128.     }else if (grounded && rigidbody.velocity.magnitude < (runSpeed+2) && rigidbody.velocity.magnitude > (runSpeed -2)){
    129.         playerWeapons.animation.CrossFade("Run");
    130.        
    131.     }else if (grounded && rigidbody.velocity.magnitude < (crouchSpeed+1) && rigidbody.velocity.magnitude > (crouchSpeed-1) && Input.GetButton("Fire2"))
    132.         playerWeapons.animation.CrossFade("CrouchAim");
    133.    
    134.     else
    135.         playerWeapons.animation.CrossFade("IdleAnim");
    136.        
    137.    
    138.     if(mainCameraGO.transform.localPosition.y > normalHeight){
    139.         mainCameraGO.transform.localPosition.y = normalHeight;
    140.     } else if(mainCameraGO.transform.localPosition.y < crouchHeight){
    141.         mainCameraGO.transform.localPosition.y = crouchHeight;
    142.     }
    143.    
    144.     if(weaponCameraGO.transform.localPosition.y > normalHeight){
    145.         weaponCameraGO.transform.localPosition.y = normalHeight;
    146.     } else if(weaponCameraGO.transform.localPosition.y < crouchHeight){
    147.         weaponCameraGO.transform.localPosition.y = crouchHeight;
    148.     }
    149.    
    150.     if (Input.GetButtonDown("Crouch") && !crouching) {
    151.         collider.height = 1.5;
    152.         collider.center = Vector3 (0, -0.25, 0);
    153.         crouching = true;
    154.     }
    155.  
    156.     if(Input.GetButtonUp("Crouch") && crouching){
    157.         collider.height = 2.0;
    158.         collider.center = Vector3 (0, 0, 0);
    159.         crouching = false;
    160.     }
    161.    
    162.     if(crouching){
    163.         if(mainCameraGO.transform.localPosition.y > crouchHeight){
    164.             if(mainCameraGO.transform.localPosition.y - (crouchingHeight * Time.deltaTime/.1) < crouchHeight){
    165.                 mainCameraGO.transform.localPosition.y = crouchHeight;
    166.             } else {
    167.                 mainCameraGO.transform.localPosition.y -= crouchingHeight * Time.deltaTime/.1;
    168.             }
    169.         }
    170.         if(weaponCameraGO.transform.localPosition.y > crouchHeight){
    171.             if(weaponCameraGO.transform.localPosition.y - (crouchingHeight * Time.deltaTime/.1) < crouchHeight){
    172.                 weaponCameraGO.transform.localPosition.y = crouchHeight;
    173.             } else {
    174.                 weaponCameraGO.transform.localPosition.y -= crouchingHeight * Time.deltaTime/.1;
    175.             }
    176.         }
    177.  
    178.     } else {
    179.         if(mainCameraGO.transform.localPosition.y < normalHeight){
    180.             if(mainCameraGO.transform.localPosition.y + (crouchingHeight * Time.deltaTime/.1) > normalHeight){
    181.                 mainCameraGO.transform.localPosition.y = normalHeight;
    182.             } else {
    183.                 mainCameraGO.transform.localPosition.y += crouchingHeight * Time.deltaTime/.1;
    184.             }
    185.         }
    186.         if(weaponCameraGO.transform.localPosition.y < normalHeight){
    187.             if(weaponCameraGO.transform.localPosition.y + (crouchingHeight * Time.deltaTime/.1) > normalHeight){
    188.                 weaponCameraGO.transform.localPosition.y = normalHeight;
    189.             } else {
    190.                 weaponCameraGO.transform.localPosition.y += crouchingHeight * Time.deltaTime/.1;
    191.             }
    192.         }
    193.     }
    194. }
    195.  
    196. function Accelerate (accelerateY : float, accelerateZ : float){
    197.     grounded = false;
    198.     rigidbody.AddRelativeForce (0, accelerateY, accelerateZ);   
    199. }


  20. Posts
    2
    I have problem when i set gunCamera depth to 0 , my weapon not recive shadows from another objects how to fix this?


 
Page 1 of 9 123 ... LastLast