Git Product home page Git Product logo

simpleplatformer's Introduction

충돌감지방식

  1. 원하는 만큼 이동한 뒤 충돌검사를 해서 뒤로 밀려나게 하는방법
    • 2개이상의 방향이 겹쳐지는 경우 버그가 생길 수 있음
  2. 이동 전 앞으로 갈 방향에 충돌체가 있는경우 겹쳐지지 않도록 델타값만큼 조금만 이동하는 방법 - 내가 힘을 주고있는 힘과 방향에 따라 이동거리를 계산
    • 겹쳐지는 경우에 대한 건 생각하지 않기 때문에 정적인 지형에서만 충돌처리가 가능함
    • 현서님이 피드백한 움직이는 플랫폼에 대한 충돌감지는 이 방법만으로는 해결 할 수 없음
    • 일단 당장 생각나는 방법은 없어서 구현하지 못하고 다른 기능을 우선 구현할 생각임

CharacterController2D => CharacterRigidbody , CharacterMovement로 기능 분리

  • PlayerInput 에서 플레이어가 키입력
  • CharacterMovement에게 이동명령
  • CharacterMovement는 충돌을 담당하는 CharacterRigidbody에게 겹쳐지지 않는 선에서 이동 가능한 거리를 받아와서 이동시킴

점프

AinmationController

  • CharacterMovement와 CharacterRigidbody를 참조해서 현재 상태에서 사용할 애니메이션을 보여줌

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.