Search Unity

Character Controller And Physics

Discussion in 'Animation' started by atmuc, Sep 30, 2013.

  1. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,055
    i confused about this; if i move something with transform.translate my game object can be pass through a wall. objects that uses physics should be moved with forces. i see character controllers use transform position. what is the rule to use;

    character
    static wall,
    moving object like car

    what should i add (rigibody, collider,...), and how to move them?
     
  2. Staross

    Staross

    Joined:
    Jan 6, 2013
    Posts:
    51
    You should use CharacterController.Move:

     
  3. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,055
    because i need different collider from capsule i cannot use character controller for my project. i make an old style atari tennis game. i will control rackets. i know there are simple methods like using position limiting but i want to use colliders because there will be extra moving objects. ball and other moving objects have rigibody so there is no problem with them. also there are box colliders on boundaries. my problem is to stop racket at the bottom and at the top using collider. i learned that if do not physics on my racket and want to use collider only way is to use rigibody and freeze all position and rotation constraints. i want to know how character controller works with it's collider? is there any way to make what i want without rigibody? i tried to use raycast but i am not sure if it is a correct solution. in fact what i need is a custom character controller with precise collision control.
     
unityunity