Unity Community


Page 1 of 11 123 ... LastLast
Results 1 to 20 of 209

  1. Location
    Michigan USA
    Posts
    460

    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:

    Screw what I said in the video, just post your glitches and questions in this thread.

    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 whatever problems they are having, and I think I will be able to do this more effectively on the forums.


    Here's a link to a video by ReaperZ1997 on how to fix the gun rotation and position:
    http://www.youtube.com/watch?v=TGyTGD7yRo0
    Last edited by eteeski; 10-03-2013 at 10:05 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
    Newcastle Upon Tyne, UK
    Posts
    73
    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


  3. Location
    South Africa
    Posts
    157

    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


  4. 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?


  5. 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


  6. Posts
    40
    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


  7. Posts
    3
    FPS 1.8

    i have a strange proble when aiming left to right;

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


  8. 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


  9. 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


  10. 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


  11. 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


  12. 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


  13. 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.


  14. 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.


  15. 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.


  16. Location
    Zaragoza, Spain
    Posts
    7

    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


  17. 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?


  18. Location
    Gold Coast, Australia
    Posts
    138

    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. }


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


  20. Posts
    6
    ETeeskiTutorials FPS1 problems..[ FPS 1.18] Muzzle Flash and FPS 1.21: (Basic Crouching)

    http://forum.unity3d.com/threads/131...992#post886992

Page 1 of 11 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
  •