Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Character controller up vector should be configurable

Discussion in 'Physics' started by aubergine, Aug 1, 2018.

Thread Status:
Not open for further replies.
  1. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    It is very frustrating as it is, and limiting the controller movement to only planar surfaces with y as up vector.
    Physx character controller itself has a configurable up vector, why not unitys?
     
    AlleywayNick likes this.
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Have you tried using Quaternary, to rotate your vector?
    Vector.Up, is a local transformation reference to the attached object, or world up, if not attached to anything.
    With Quaternion, you can rotate to the you up, to whatever direction you like.
     
  3. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    Have you tried rotating the character controller capsule on x or z axis? We talk again after you do that.
     
    AlleywayNick likes this.
  4. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26
    This has been a huge frustration for me for a few years now, I don't understand why Unity won't give access to functionality that PhysX has in this case. I'm obviously not in the know of what it might effect, but I just can't see it causing any issues to expose the ability to modify the upvector when PhysX has it built-in: PxController::setUpDirection().

    Unity please...
     
    AlleywayDave likes this.
  5. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Character Controller has been designed for simple implementation as is. Don't expect any changes soon to be honest.
    Whole 2D thingy approach will change with upcoming ECS.
    You can do all in 3D what you can in 2D. Plenty good assets out there, if not confident with writing own character controller by your self.
     
  7. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26
    You might not understand what this post is about? We are talking about the CharacterController collider here which is a PhysX implementation, not the 1st or 3rd person prebuilt scripts. It is a kinematic CCT that uses the 'collide and slide' algorithm and is fairly important to creating custom character controllers. PhysX has built-in support for control the upvector of the collider in the physics engine which is useful when using the collider for characters that do more than just simple platforming.
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    You are most likely familiar with these, but anyway

    CharacterController
    https://docs.unity3d.com/ScriptReference/CharacterController.html

    Character Controller
    https://docs.unity3d.com/Manual/class-CharacterController.html

    The purpose of Character Controller is simplicity.
    Which also results, unfortunately, you can not swap axis.
     
  9. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26

    The purpose is not for simplicity. The purpose is explained thoroughly by the PhysX documentation which can be found here: https://docs.nvidia.com/gameworks/c.../physx/guide/Manual/CharacterControllers.html

    Unity's CharacterController is an implementation of this, you shouldn't say the purpose is to be simple when the purpose is in fact to solve a myriad of problems in an elegant way. Also, Unity is constantly making improvements to the engine, so why would you say they are unlikely to change it? Are you a staff dev for them working on the PhysX implementation? I'm just not sure why you seem so set on this.
     
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    This is not what I said, please read carefully again

    Because PhysX has something, doesn't mean Unity has it implemented. It can be simple as legacy case.
    Unity is pushing toward ECS architecture, so there is chance it will be completely new character controller, with more flexibility.

    But again, nothing stop you from trying and using proven solutions, which are available on asset store. Surely you can find there something, which will suite your needs.
    .
     
  11. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26
    I'm not interested in something from the asset store, I have written my own custom controllers many times using several workarounds for this issue. However, using PhysX's method (most of which is already implemented) would be much better. It is likely not a difficult thing for Unity to implement since they have done most of the implementation of the PhysX CCT anyway. You aren't really adding anything to this discussion aside from trying to tell us to just accept it isn't likely to change. I disagree, Unity has made several significant enhancements to the PhysX API in the last year and this falls right in line with some of those.

    If you are interested in a huge quality of life improvement to help those of us writing custom character controllers, feel free to go vote on the suggestion I made on the feedback forums regarding it. Simple as that, I'm not interested in being told to scour the asset store for something, I'm interested in the first-party solution from Unity.
     
    cmdexecutor and Mattias1337 like this.
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Surly this statement brings any constructive resolution.
    I am suggesting about possibly working alternatives, which can be applied almost asap. Not maybe, or after tomorrow, And you have right to disagree. However, this not changes the fact, what is not implemented, it is not. Irrelevant weather is easy, or not, to do so.
    You expecting solution now? Find alternative. Or wait for filled query to Unity. You may get it in next update, or never. Depends on the road map. This thread will not accelerate it anyway.

    It appears you came here only to dispute from very first post on this thread, misinterpreting what I am saying, or not reading carefully.


    Asking Mod to close this thread as it leads no where.
     
  13. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26
    Yes, you are leading it nowhere, I already said I filed it as a suggestion. :D
     
  14. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    Antypodish you have misunderstood the point of initial post. So please dont make an irrelevant argument about it.
     
  15. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    The character controller just needs to be open sourced.

    It works fine for prototypes, but it's basically useless later. It would be nice to peek at how it works but basically you just have to roll your own if you want any kinda of real control.

    That's really all there is to it.
     
    Antypodish likes this.
  16. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    Character controller is more than enough for many occasions and already extendable as it is if you know how to, however it would just be great to have a definable up vector. Same applies to billboards as well.
     
  17. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's not happening for the Physx one, but Unity knows the issues with it and is currently making a new replacement that can do this. It will be called the Open Character Controller (OCC) and will be out when @willgoldstone is ready. The good part is that it will also be open source, but accept the same kind of code the existing character controller does.
     
    Mattias1337 and Antypodish like this.
  18. AlleywayNick

    AlleywayNick

    Joined:
    Jan 26, 2014
    Posts:
    26
    That sounds like good news! Thanks for the response!
     
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
Thread Status:
Not open for further replies.