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

Third Person with no mouse look

Discussion in 'General Discussion' started by ericj86, Feb 15, 2017.

  1. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    Still trying to find a way to make a third person controller with NO mouse look. When I google "unity third person controller NO MOUSE". Nothing but with a mouse shows up.

    Is there any examples, tutorials, guides, scripts or anything at all that can help me with making a third person controller with no mouse look? Sort of like tank controls and only 1 directional pad is used.

    I posted over a year ago about something similar and have been trying to do this for almost 3 years now when I started unity.

    Im starting to question is this even possible with Unity?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    This is absolutely possible with Unity. Just use the mouse based ones as a base and instead of using the mouse inputs, you use whatever axis inputs you want. You may have to tweak it a bit but this really shouldn't be something it takes you three years to accomplish.
     
    angrypenguin, Ryiah and Martin_H like this.
  3. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Standard assets include (used to anyway - don't know if it's still in there) a third-person controller with several options including one like that.
     
  4. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    Just about anything will take years for someone who doesn't learn the engine first.
     
    Martin_H likes this.
  5. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    Thanks. I managed to get the camera to stay behind the player and use only 1 directional pad.
     
  6. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Controllers aren't hard to write from scratch. You could get this working in an afternoon.
     
  7. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    What is it that you're trying to do?

    Are you trying to make a 3rd person controller to be used with a game pad?

    Are you trying to make the camera trail the player no matter what?

    Are you doing a bird's-eye-view?

    Are you on a rail like in Crash Bandicoot?
     
  8. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    Yes a third person controller with game pad. But only 1 directional pad so yes the camera trail would stick behind the player. No birds eye view just camera looking down at the player following. No rail like Crash Bandicoot.

    Here is exactly the kind of third person controller i'm talking about.


    I'm just trying to get a controller like that out of the way so I can start to learn designing graphics and building maps/levels.

    I was going to implement Photon for multiplayer after and have a 4 player arena game like that one in the example above.
     
  9. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    Honestly, if you're having trouble making a third person camera, you'd probably be better off exploring the learn section and making a small game out of what you learn there before you try any networking stuff.
     
    Martin_H, angrypenguin and Kiwasi like this.
  10. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Lol. You can't make a camera follow a character, but you can do networking? Something's not right with this picture.
     
  11. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Well, for starters that appears to have a second thumb stick.

    But, if you're wanting to not have any at all you'll want to set up the camera to trail behind the player then look at them and/or the direction they're moving.

    OR you could set up multiple cameras that activate on triggers like the old Resident Evil Games.
     
  12. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    551
    Just make a camera the child of the player object! What is seen in your video is basically first person controller with visible player model, you can reconfigure any existing FPC to behave exactly that way.
     
  13. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    Yeah Photon is easy to implement and have multiplayer. There is a video showing how to add it to any scene. A lot easier then making a character controller like the one in that video. I managed to get the camera to follow the character.
     
  14. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    Its hard customing the third person controller. Like why is there 2 files? ThirdPersonCharacter.cs and ThirdPersonUserControl.cs. Which one is used to move the character?
     
  15. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    It's designed that way so you can feed in other inputs, such as from AI (the other script provided).

    ThirdPersonCharacter handles the physical, root motion movement, of the character while ThirdPersonUserControl gathers input, calculates the desired movement parameters and then feeds it into the ThirdPersonCharacter.

    ThirdPersonUserControl is all relative to the camera as well, so it's literally drag and drop the prefab and throw in a camera. As long as you have your camera placed correctly the character will move in relation to it.
     
    Kiwasi and Ryiah like this.
  16. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    Stop. No, seriously, stop. Use the tutorials in the Learn section on this site and get a handle on the basics of Unity first. You're just setting yourself up for failure.
     
    Martin_H and Kiwasi like this.
  17. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    Thanks I understand it now.
     
  18. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    You must of not understood me. I said I was going to implement Photon, as in the future after I have the character controller all done and a scene designed.
     
  19. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    551
    ThirdPersonCharacter.cs. It is a "motor", meaning it can also be used by AI characters. ThirdPersonUserControl.cs handles player input. And there should be third separate script that handles camera.
    Bear in mind that it is not the best controller to customize. Since it is moved by root motion (movement deltas which are stored in animation files). Should you replace one of these animations, movement may break.
    In any case, you'll have your hands full trying to set up any of these controllers for Photon, as their scripts may not be compatible with multiplayer.
     
    Kiwasi likes this.
  20. DimitriX89

    DimitriX89

    Joined:
    Jun 3, 2015
    Posts:
    551
    Damn waited for too long before pressing post reply
     
  21. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,084
    No, I DO understand you. I also understand networking and how it's far more complicated than it seems at first for a beginner.
     
  22. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    No, they understood what you were saying. It's just that someone who is struggling with a simple task like modifying the character controller has a snowball's chance in hell of implementing networking. Networking is not a beginner topic by any means and you are a beginner. I'd highly recommend learning Unity properly first before you start that headache.
     
    angrypenguin, theANMATOR2b and Kiwasi like this.
  23. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    I've implemented photon networking. It's much harder then simply getting a character controller to behave.

    Seriously, go back to the learn section. Learn to program in C#. You won't be able to build something this big via copy-paste.
     
  24. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    I know C#, I have done PHP for over 15 years and Java. There are a lot of videos showing how to implement Photon really easy into any project. But I meant I would do multiplayer years after I have learned character controllers and just about everything else. Again mis-understood me. This is about the third person character controller.


     
  25. ericj86

    ericj86

    Joined:
    Dec 30, 2015
    Posts:
    19
    I've managed to get it working and with game pad support to. It actually allows for slower or faster rotation and running depending if the stick is a little held down/tilted or the full amount.