Giter VIP home page Giter VIP logo

fps_i's Introduction

FPS_I

First FPS Game with 인생유니티교과서

// 22.03.28.~

MY Question

//<summary>  
//   
//  #1. CodeA, Rigidbody, CapsuleCollider  
//  #2. CodeB, CharacterController  
//  
//  When you Have this code, RigidBody and CapSuleCollider, Player just go up, and fall Down  
//  But now Why Player just go up and Fall Down??  
//  
//  I think #1 is not calculate gravitiyForce RealTimely.  
//  But #2 calculate gravityForce RealTimely for everyFrame(CodeB)  
//<summary/>  

  
  
  
//transform.position += dir * moveSpeed * Time.deltaTime;           //CodeA  

//<summary>  
//   
//  #1. Code C - yVelocity += gravitiy * Time.deltaTime;    (wellDone!!)  
//  #2. Code D - yVelocity = -9.87f;                        (wellDone!!)  
//  #3. Code E(Upgrade Code D)                              (It doesnt worked!!)  
//  
//  yVelocity += gravitiy * Time.deltaTime;  
//  this code make yVelocitiy down unlimitly, so why not just set yVelocity < 0 ??  
//  and why set Gravitiy Scale = -20f;  
//      
//  #2 is nice work!!  
//    
//  #3. Change dirVector with yVelocity into Camera Standard Vector using TransformDirction(LINE 46)  
//    
//<summary/>  

//<CodeB>
//yVelocity += gravitiy * Time.deltaTime;                             //CodeC  
yVelocity = -9.87f;                                                   //CodeD  
dir.y = yVelocity;  

//<summary>
//   
//  #1. Code F - cc.Move(dir * moveSpeed * Time.deltaTime);                 (wellDone!!)  
//  #2. Code G - transform.position += dir * moveSpeed * Time.deltaTime     (It doesnt worked)  
//  
//  I dont know What is Different in CodeF, CodeG    
//  
//<summary/>  
cc.Move(dir * moveSpeed * Time.deltaTime);                
//<CodeB/>  

+++Link) https://github.com/mw08081/FPS_I/blob/main/Assets/Resource/Player/cs/PlayerInputController.cs

fps_i's People

Contributors

mw08081 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.