Search Unity

Understanding scales for first person

Discussion in 'Getting Started' started by brummygit, Sep 26, 2016.

  1. brummygit

    brummygit

    Joined:
    Sep 26, 2016
    Posts:
    14
    Hey, all!

    Very new to Unity. I'm currently trying to understand scales, etc especially when using the First Person prefab thingy. I gather that 1 unit is 1m in Unity, default person in the prefab is 1.8m tall (sounds about right!). However...

    I set up a "room" about the same size as one of my rooms at home. 5x4m, 2.5m high. And threw a FPSController prefab in it. As you do.

    Problem is, the view looks wrong, the room I'm in is navigated at super-human speeds, and jumping means I hit my head on the ceiling. I can't do that at home! I even set up a 2.5m high wall separately and was able to jump to see over it with ease.

    So my question(s):
    1, do i have the assumptions about scales correct?
    2, if so, what would be some better defaults to use for the FPSController prefab?
    3, if not, can someone please share the secret that I seem to be missing here?

    Help make me human :)

    M
     
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Your assumptions are correct.

    The thing is that FPS games have been lying to us for years. The default FPS controller has values that are typical for FPS games. But for an actual human they are impossible to acheive. FPS games sell a power fantasy, so the character is faster, jumps higher, and turns quicker then is physically possible.

    Kind of like Barbie proportions, but marketed to boys instead of girls. ;)
     
  3. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    Basically what he said. For example, just consider the jump height; if the player is 1.8m tall and seeing over a 2.5m wall, that means he's jumping at least half his height! Not totally outside the realm of possibility, but a very high jump.

    Spaces in a game level need to be way bigger than rooms in real life.
     
    Last edited: Sep 27, 2016
    Ryiah and brummygit like this.
  4. brummygit

    brummygit

    Joined:
    Sep 26, 2016
    Posts:
    14
    Understood, and thanks, both! So the thing is, I'm making many of the models based on real-world measurements (roughly speaking) because I find it easier. So two little further questions:

    - Rather than individually scaling up each item (building, furniture, etc), would it be workable/feasible to throw all of my world objects into an empty parent object and scale that up to suit? Or will this cause problems down the line that I may not see now?
    - Would I be better scaling down the FPSController instead?
    - Are there any slightly more realistic settings you could recommend to emulate, for example, Call of Duty/Battlefield, etc type movement/jumping, etc? Is the FPSController bad for this and therefore should I be looking elsewhere?

    Cheers!
     
  5. Deleted User

    Deleted User

    Guest

    These are not people who have any legitimate interest in teaching you anything, or the first thing they would have told you is that nobody uses the default character controller.

    I strongly recommend coming up with a concept that has a scope of spatial dimensions smaller than necessarily a free-movement FPS. Think about how the Roll A Ball tutorial exists on a plane. Can you used Unity's methods to move and constrain the ball without using the physics engine?

    What I'm saying is, the results only don't make sense because you don't know what you're actually doing. If you wrote the character controller it would appear to be functioning great.

    As to whether or not that particular controller class can be adapted to your particular case, I have no idea. What I do know is that you'll learn more faster if you spend a week making a character controller than basically whatever it is you think you're doing now.
     
  6. jhocking

    jhocking

    Joined:
    Nov 21, 2009
    Posts:
    814
    hey thanks for opening your post with an out-of-the-blue unwarranted attack :eek:

    Anyway, are you sure you mean the character controller or the fps controller? Because those are separate things; I agree about avoiding the fps movement controller that comes with Unity, but I routinely use Unity's Character Controller component.
     
    brummygit likes this.
  7. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    That's a straight up falsehood. If you are building a game on your own then picking and choosing what to use off the shelf and what to build custom is important. If the controller is critical to your game, then sure, go custom. But if the controller is not critical, just tweaking the existing script will do fine.
     
    brummygit likes this.
  8. Iron-Warrior

    Iron-Warrior

    Joined:
    Nov 3, 2009
    Posts:
    838
    Just a heads up, make sure you play around with the camera's Field of View before going nuts scaling everything around. Unity's default camera's FoV is 60 (not sure what the one in the FPS controller prefab is), but most FPS games tend to hover around 90 (and some go even higher). Human eyes function differently than the game camera, but suffice to say we have an extremely high field of view. Higher field of views make spaces look much larger, which is why when you go apartment shopping everyone takes the photos with a fish eye lens!
     
    theANMATOR2b and brummygit like this.
  9. Deleted User

    Deleted User

    Guest

    Picking and choosing what to use off the shelf?

    A person who has in the past admitted he hopes the "dream stays alive" (eg people, mostly kids, keep buying assets they aren't ready to justify the purchase of) would say that. I'm advocating autonomy, and if you want to become autonomous with Unity the first thing you need to do is stop relying on scripts other people wrote and figure out how to write them yourself.

    Using bought and borrowed scripts is important, but the core skills required to smoothly integrate these assets into your project presuppose that you know how assets in general interact. If you can't even speak Unity's language, that's why Roll A Ball pretty much starts with Physics.Rigidbody. Because it's a fun place to start.

    If you ask most professional developers, eg, people making games, not trying to sell incomplete potential parts of games; they'e gonna tell you a few core tools are improtant, and for any given project they're probably going to have a handful of valuable plugins that played an important role. They will be able to describe the purpose of each and how they function conceptually, but still using granular terms that describe what they actually paid for.

    You wont find a legitimately successful developer out there who can't describe how their own character moves forward in the terms defined by the manual for the tool they used.

    That's why you haven't seen any of my work, because my first year has been mostly core concepts and conceptual work. Because I was organized, I have already been able to directly reference and re-use code I wrote and understand.

    I'm just telling you, I post, I leave, I ask legit questions that I learn from. There are people here who post all the time and don't really tell the straight story.
     
    Last edited by a moderator: Oct 2, 2016
  10. brummygit

    brummygit

    Joined:
    Sep 26, 2016
    Posts:
    14
    Perhaps, perhaps not. The main thing I'm concentrating on at the moment is making sure what I'm seeing on screen seems...natural. Be it with the FPS prefab, standard camera, etc. I'm not new to coding (C/C++, even a dabble of ASM!) so I have no problem getting my hands dirty in that regard - I just want to sort of get to a point where I can mock up the end result quickly before I do so.

    To clarify just a little more - I measured the downstairs of my house, threw it all into Blender (give or take the odd 5 or 10cm and I used metric measurements) and imported it into Unity (no scaling problems there). Now....dropping the object into the scene view, everything seemed very small. So I threw it into an empty object scaled to 1.25. Kind of looked ok...ish!

    If anything, the result is that the 'width' seems squashed rather than the distance along my view.

    This is indeed something I played with, but the 'depth' of my scene I can sort of get ok. As above, it's the width that seems a little squished :)

    In a nutshell: I cannot be the first person to measure their house or a similar familiar building, get it into Unity, and walk around it thinking "Yep, nailed it!"

    Only I've not nailed it, yet :p
     
  11. Deleted User

    Deleted User

    Guest

    I know what you're talking about in general. It's difficulty getting perspective in scenes to look right.

    Well when I experimented with volumes using a measuring tape I didn't encounter that issue. I made sure to set the camera's height at my height. I was using the SteamVR camera plugin however, which is a complicated component-based system that may have been addressing some other settings for me.

    What I personally had trouble with was proportions period. I wanted to make abstract fantasy settings but even aspects as simple as the height of walls and railings became difficult to guess and visualize in metric having used the imperial system for so long.

    There are also the near and far clipping planes to play with, and you might try different forced aspect ratio settings. I don't think any of those will help though.

    It's worth confirming the proportions of the model in Blender are actually correct as well, though I totally believe you if you say they are.

    Maybe it's a quirk of perspective projections? I don't know enough about the topic yet to answer.



    maybe?
     
    brummygit likes this.