Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Official Say hello to the new Starter Asset packages

Discussion in 'Assets and Asset Store' started by UnityHas, Jun 9, 2021.

  1. hongyang041

    hongyang041

    Joined:
    May 27, 2022
    Posts:
    1
    i add the UI overlay, but I still cannot move using the UI.
    I hook up the Player Prefab to the UI Canvas.

    upload_2022-6-2_10-13-1.png
     
  2. true_warlock

    true_warlock

    Joined:
    Aug 2, 2019
    Posts:
    52
    I definitely have tried many times such as preventing player from turning and snapping back to face camera view. For example and sake of argument, if you hold a steering wheel left and move forward, naturally you will turn left going forward. If you keep the steering left and move backward, the back end should go left in reverse and so on. NONE of the Rigidbody or Character Controller systems do that. Nor do they have the options to set anything up that way. That has been a problem for many years for what should be a logical function design.

    In a RigidBody setup I managed to get this to work but it took me months to figure it out because of the lack of documentation but it was surprisingly a small amount of code.

    Code (CSharp):
    1.    
    2.     private Rigidbody rb;
    3.     private float moveSpeed;
    4.     [SerializeField] [Range(0, 10)] private float speedMultiplier;
    5.     [SerializeField] [Range(0, 10)] private float rotSpeed;
    6.  
    7.  
    8. private void Update()
    9.     {
    10.         //need to figure out how to make movement smoother
    11.         Vector3 input = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
    12.      
    13.  
    14.         //Apply motion
    15.         if (state == State.loco)
    16.         {
    17.             float x = Input.GetAxisRaw("Vertical") < 0 ? -input.x : input.x;
    18.             rb.angularVelocity = Vector3.up * x * rotSpeed;
    19.         }
    20.  
    21. }
    22.  
    23. private void MovePlayer()
    24.     {
    25.         Vector3 input = new Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"));
    26.         rb.transform.TransformVector(new Vector3(input.x, input.y, input.z * moveSpeed * speedMultiplier));      
    27.  
    28.     }
    29. }
    30.  
    Trying to do this in Character Controllers has proven problematic. Especially trying to do a similar option in this particular asset that as usual has dependencies it really does not need..
     
  3. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276


    This video demonstrates the capabilities of Unitys default Character Controller component when used right. It's not only about who has the "biggest" Character Controller but also how to make the best use of it :).

    The Character Controller shown in the video uses the Starter Assets Third Person Controller as a base and builds on top of that ;). Simple states were used in combination with abilities. The Third Person Controller component was integrated as an ability. The player switches to strafe-movement when aiming to shoot. Melee is executed with root motion with update mode set to normal for producing smooth and fluid animations. Various Unity Asset Store assets were used as well to create the presented visuals and look and feel.

    In my honest opinion, I think Unitys default Character Controller component is way underrated and the Starter Assets definitely deserve more love :).
     
  4. darashayda

    darashayda

    Joined:
    Jun 27, 2020
    Posts:
    230
    Thank you and you got my vote as a second.

    Disclaimer: None of the presented materials by any stretch of imagination were meant to Advertise nor Spam any Unity organization. Nor meant to solicit business from anyone at Unity nor its customer base. Materials are solely meant for non-commercial Work-In-Progress presentation.
     
  5. Barbaraboom

    Barbaraboom

    Joined:
    Jun 21, 2022
    Posts:
    1
    Hi! everything gone pink after i upgradet the project materials to Universal IRP
     

    Attached Files:

  6. starman6636

    starman6636

    Joined:
    Aug 16, 2019
    Posts:
    1
    moving my mouse while holding "w" doesn't change the move direction of the character, he just walks straight into a wall, Am I missing something?? TIA for ANY ideas,.
     
  7. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    maybe the mouse sensitivity in the StarterAssets.inputactions file is set too low? Or it could be some issue related to the new input system. You could try Tools -> Starter Assets -> Reinstall Dependencies to resolve the issue.
     
  8. bronsonzgeb

    bronsonzgeb

    Unity Technologies

    Joined:
    Aug 10, 2020
    Posts:
    101
    Hi folks, I just wanted to let you know that I no longer work for Unity so I won't be able to help with any outstanding issues anymore. I'm not sure if another team will take ownership of the package, so I'm not sure who you can direct your questions to in my stead.

    Good luck with your projects! All the best!
     
  9. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    That's very sad to hear :(.
    I think you've done an awesome job at Unity.
    All of these events happening at the same time right now are really worrying me.
    All the best for the future - I hope you will remain with the community.
     
  10. Yunittie

    Yunittie

    Joined:
    Jun 27, 2022
    Posts:
    6
    Hello,

    I am using Unity version 2021.3.8f1 and I cannot get to work the Starter Assets - Third Person Character Controller anymore. It stopped working in Unity version 2021.3.7f1 (or even prior but I couldn't use it for sure in these two versions).

    Assets\StarterAssets\Editor\StarterAssetsDeployMenu.cs(39,28): error CS0117: 'PackageChecker' does not contain a definition for 'RemovePackageCheckerScriptingDefine'.

    I saw under "Reviews" in the Asset Store that there are people with the exact same error and I still keep getting it instantly after importing all files.
    I would greatly appreciate any feedback since I can't enter play mode nor continue to work on my project.
    Thank you!
     
  11. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    @bronsonzgeb has released the PackageChecker as a plain C# script. You can get it here: https://gist.github.com/bzgeb/4003226a0d9af855c7ff20750e9b2490

    I would try to delete the old Package Checker you are using and replace it by the one from the link. It definitely contains a definition for RemovePackageCheckerScriptingDefine - it's the last function in the script :).
    Just make sure you don't have the PackageChecker.cs and .dll in the same project.

    Another option that could potentially resolve the issue is removing your current PackageChecker and reimporting the latest PackageChecker from the Starter Assets Package.
     
  12. Yunittie

    Yunittie

    Joined:
    Jun 27, 2022
    Posts:
    6
    Thanks :) , I deleted and redownloaded the Starter Assets Package twice (the first time except for StarterAssetsPackageChecker.dll and later once again the full Starter Assets Package to see if the following error still appears).

    The error says now:
    Assets\StarterAsssets\ThirdPersonController\Scripts\ThirdPersonController.cs{118,37}: error CS1061: 'PlayerInput' does not contain a definition for 'currentControlScheme' and no accessible extension method 'currentControlScheme' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)

    I'm not sure what to do now
     
  13. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    try the following:
    1) open the Package Manager
    2) change "Packages: My Assets" to "Packages: Unity Registry"
    3) scroll down to "Input System" and install the (new) Input System (if Cinemachine isn't installed either, install Cinemachine as well please)
    4) now go to Edit --> Project Settings and select "Player"
    5) scroll down to "Other Settings" and under "Configuration" set "Active Input Handling" to either "Input System Package (New)" or "Both" (Both is the saver selection in case you are using the old input system in your project as well)
     
  14. Yunittie

    Yunittie

    Joined:
    Jun 27, 2022
    Posts:
    6
    Done, sadly the error still appears
    Assets\StarterAsssets\ThirdPersonController\Scripts\ThirdPersonController.cs{118,37}: error CS1061: 'PlayerInput' does not contain a definition for 'currentControlScheme' and no accessible extension method 'currentControlScheme' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)

    And a new one too (after redownloading and importing the New Input System and Cinemachine and after step 5):
    Assets\Samples\Input System\1.4.1\Unity Remote\UnityRemoteTestScript.cs(10,19): warning CS0108: 'UnityRemoteTestScript.camera' hides inherited member 'Component.camera'. Use the new keyword if hiding was intended.

    I appreciate your help Kreshi, this error is really weird (I also restarted Unity multiple times)
     
  15. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    Why did you import an Input System sample?
    You only needed to install the Input System - no additional sample import was required :).
    You can delete the "Samples" folder (Assets -> Samples) in case you don't have stuff you use there yourself.

    Can you check if you have any other compile errors please? Because for me it looks like a different compile error is blocking the compilation/install of the new input system.

    Can you create a new, empty Unity project and install the Input System there and check if you have any errors ( don't import the additional Input System samples)?
    If you don't have errors, try importing the Starter Assets package.
    After that, tell me if this worked :).
     
    Yunittie and hkalterkait like this.
  16. Yunittie

    Yunittie

    Joined:
    Jun 27, 2022
    Posts:
    6
    I created a new Unity project and the Third Person Controller works fine and I can move around :) (Unity Hub: New Project -> "Third Person" Template -> Create project).
    Out of my Assets it was the "3D Game Kit" from the Asset Store which caused these errors (originally I intended to use it because of its many possibilities without needing to write any code).
     
    Kreshi likes this.
  17. Jaroski

    Jaroski

    Joined:
    Feb 23, 2021
    Posts:
    1
    Hi,
    I had the same issue. Prefabs are not correctly matched with their default size to model's size and ground detection.
    Ground detection code isn't described well for beginers too.
    I have marked with red line what you should check out and experiment with.

    This green thing is a "feet" sphere. If it collide with anything - it's called ground.
    Code (CSharp):
    1. private void GroundedCheck()
    2.         {
    3.             // set sphere position, with offset
    4.             Vector3 spherePosition = new Vector3(transform.position.x, transform.position.y - GroundedOffset, transform.position.z);
    5.             Grounded = Physics.CheckSphere(spherePosition, GroundedRadius, GroundLayers, QueryTriggerInteraction.Ignore);
    6.         }
    We can adjust variables Ground Offset - it determines position for our feet sphere (transform.position.y - GroundedOffset)
    There is also variable Grounded Radius - it's radius of our foot sphere.


    upload_2022-8-23_4-31-11.png


    You can make it smaller or adjust it's position to avoid being "Grounded" while touching tunnel's ceiling. You might also increase scale / size of environment objects.
    upload_2022-8-23_4-39-10.png
     
  18. segamboa

    segamboa

    Joined:
    Feb 5, 2021
    Posts:
    1
    Could you find the error?
     
  19. justasduke

    justasduke

    Joined:
    Feb 23, 2013
    Posts:
    1
    how can i change the first person field of view? the slider in the settings for the camera wont move
     
  20. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    You have to change it on the virtual camera because it overrides the settings.
     
  21. KeyitDay

    KeyitDay

    Joined:
    Aug 21, 2019
    Posts:
    3
    how do you make the camera a 2.5d isometric view without perspective?
     
  22. bauerbach

    bauerbach

    Joined:
    Sep 14, 2022
    Posts:
    2
    For some reason, the scripts show up as "Missing", and no compile errors show up in the log at all! That is very disappointing, because I really wanted to use these packages!
     
  23. jaydkent

    jaydkent

    Joined:
    Aug 30, 2022
    Posts:
    7
    Hello everyone! I wondered if there was an easy way to add a 'zoom out with mouse scroll' function to this starter asset? I am fairly new to Unity and don't want to mess up the code too much incase I break everything! Thanks! :)
     
  24. Pixitales

    Pixitales

    Joined:
    Oct 24, 2018
    Posts:
    225
     
  25. Pixitales

    Pixitales

    Joined:
    Oct 24, 2018
    Posts:
    225
    Maybe this will help out someone in the future. If you turn on analog movement and move diagonal with keyboard input, your character will look like its moving faster.

    Simple fix by clamping motion speed to 0 -1:

    Code (CSharp):
    1.         animator.SetFloat(_animIDSpeed, _animationBlend);
    2.         animator.SetFloat(_animIDMotionSpeed, Mathf.Min(inputMagnitude, 1));
     
  26. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    Here is what I did. I have a scene with a player model (with animations). I imported the First Person Controller asset and ran the demo. All is well.
    I then opened my scene, added a Cinemachine brain to my main camera, dragged in the PlayerFollowCamera prefab. Added the same scripts to my player that the capsule has in the demo. Mapped up all assets to the appropriate locations in the scripts and hit run. I can walk and run, rotate(look) side to side, but can not look up and down nor jump.
    I then deleted my own main camera and dragged in the assets maincamera prefab. Same result. I turned off the animator and same result. Debug.Log in the first person controller script shows the pitch is going from -89 to 89.
    What may I have missed in the process?
     
    Last edited: Sep 23, 2022
  27. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    Maybe there is some reference not configured properly. Try checking the console for errors during playmode.
     
  28. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    No errors in the console. Wish there was...lol
     
  29. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    I created a new project, added the starter assets, duplicated the prefabs, set everything up, added my T-model and it all worked. Could look up and down, jump, etc.
    Added my animation for idle and run. Ran it and my character sits in idle animation.
    Edited the first person script to add the animator and poof, no more looking up and down or jumping. Odd part is I reverted the code to its original source and still can recover the look up and down. The eye ball icon now pivots with mouse up and down:
    upload_2022-9-23_15-54-43.png
     
  30. KeyitDay

    KeyitDay

    Joined:
    Aug 21, 2019
    Posts:
    3
    could someone please help me with the question I posted above? how to change the camera to isometric without perspective
     
  31. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    In addition to my issue above, why would my avatars speed drop just because I swapped the capsule for an animated model?
     
  32. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    Not sure if this is what you are looking for, but found it interesting.
     
  33. sayuhhm

    sayuhhm

    Joined:
    May 4, 2022
    Posts:
    1
    Does anyone know how to configure the third person controller to rotate with / stay behind the player? Ideally I would like to use WASD to control player movement and camera rotation in unison while the mouse controls a limited look-around.

    Sorry if this has already been answered elsewhere but I'm struggling to find a solution
     
  34. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    Some good info here on the topic: https://forum.unity.com/threads/third-person-camera-follow-behind-character.898673/
     
  35. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    I removed everything from my scene, re-added the starter asset FPC, then added my character and redid the process. All working now so I must have fat-fingered something the first go around.

    But I still have the issue where the default capsule moves rather well. After putting in my model, it moves very slow, had to up the speed a great deal to be testable. Any idea why that is?
     
  36. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    check your model for colliders and/or other physic objects, maybe something got attached which interacts somehow. Try using a different 3D model instead to isolate where the issue is coming from :).
     
  37. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    Rats, was hoping that was it. Object has an animator, mesh renderer, and the 5 items that are part of the FPC asset, Character Controller, Starter Asset Inputs, Basic Rigid Body Push, First Person Controller and Player Input.
    I noticed the assets Capsule has a capsule collider on it and I do not, so I added one. No change. ugh.
     
  38. Kreshi

    Kreshi

    Joined:
    Jan 12, 2015
    Posts:
    276
    You don't have to merge everything with the PlayerCapsule object. Just parenting your model as the child of the PlayerCapsule object should be enough.
    I created a very very short video how to attach some models to your First Person Project below.

     
    Last edited: Sep 30, 2022
    Soulice likes this.
  39. Soulice

    Soulice

    Joined:
    Aug 18, 2014
    Posts:
    69
    Thanks for this! I actually replaced the capsule object with my model and moved the scripts to it and the player camera target.
    I am going to whip up something like you did and test!

    EDIT: it worked!! I appreciate all the effort you went through for.
     
    Last edited: Sep 30, 2022
    Kreshi likes this.
  40. OccularMalice

    OccularMalice

    Joined:
    Sep 8, 2014
    Posts:
    120
    Has anyone implemented a climbing mechanism with the controller? Looking at a few demos that do it with other controllers so I'm assuming it's not hard. I know it was mentioned it should be part of the controller (I agree) but if it's already been done by someone I'd like to see that. Thanks!
     
  41. Idomama

    Idomama

    Joined:
    Dec 31, 2017
    Posts:
    96
    First of all, I must say well done and it's a great package and I hope you add more things like rolling, climbing, etc...
    I have a problem with the right button of the camera rotation.
    When I try the controllers on 2 different mobiles,
    1. Xiaomi Mi 3
    2. Xiaomi redmi 10
    The rotation of the camera works at very different speeds, On one mobile it works about 3 times faster than the other.
    I saw that i can change speed on "UI_Virtual_Joystick_Look" -> "Magnitude Multiplier" But in every cell phone it's a different speed of camera rotation, how to fix it?

    Update: I tested on 4 different cell phones, in each one I get a different speed only for the right controller of the camera rotation. I would really appreciate some urgent help.
     
    Last edited: Oct 7, 2022
  42. shockedgamestudio

    shockedgamestudio

    Joined:
    Oct 26, 2021
    Posts:
    10
    How to create swimming system Starter asset character controller please reply me
     
  43. Idomama

    Idomama

    Joined:
    Dec 31, 2017
    Posts:
    96
    Thanks for a wonderful package!
    Are you going to add more animations to the package? Like: climbing, rolling, etc...
     
  44. spicykatsudon

    spicykatsudon

    Joined:
    May 6, 2022
    Posts:
    1
    Hi I was wondering if i could use the 3rd person starter asset for my fps game. I wanted to have my player a body not just a capsule. WIll there be a possible issue if i adjust the camera and position it inside the character rig to make it look like an fps?
     
  45. JonathanCel

    JonathanCel

    Joined:
    Feb 17, 2021
    Posts:
    15
    Just leaving a little feedback on the 1st/3rd person char controllers.

    Not terribly impressed; feels a bit like a minimal token effort.
    Not trying to be nasty, but it feels like my time was wasted again.

    It's 2022 and the built in Character Controller component, is still an issue, so you must deal with:

    - The capsule collider not properly falling off edges
    (e.g. you end up standing beside and slightly below an edge, awkwardly)
    - Not being able to rotate that on other axes
    - Being able to stand on almost vertical surfaces
    - Getting stuck in anim loops when approaching slopes from behind/underneath
    - Limited physics interactions
    - Jumping and hitting a ceiling holds your velo indefinitely, finally jumping on release
    - Cursor.visible & Cursor.lockState are wrong + game focus is not respected when switching to scene fiew

    It's not production ready, and to make it so you'd have to convert whatever you've built to a more heavyweight/expensive alternate controller. Or roll your own.

    Despite that being part of the job of a game engine.

    By comparison, in Unreal, you fire up the demo, and you've already got a world class, well-tested, tried & trusted character controller. Your first task is not "right, which bugs must I re-solve, or which other packages must I immediately go and buy."

    "But there's a free DOTS based collider".
    The API for which isn't fixed yet though.

    It's been a decade, same old story, it's getting very tiresome.
    I appreciate the "standard assets" finally getting some more attention, but it's still not great.

    Oh, and the URP detection seems a bit wonky, I couldn't get the demo scene to play nice at all.
     
    Last edited: Nov 1, 2022
    OccularMalice and Slashbot64 like this.
  46. Pixitales

    Pixitales

    Joined:
    Oct 24, 2018
    Posts:
    225
    I think this is probably the best character controller unity has to offer and one of the best controller out there that is free. A few bug fix and some tweaking will make this controller really good. Its a good starter asset if u need something quick and fast to build ur game. Its sad to see unity not giving support for this great starter asset anymore. The edge issue is pretty simple to fix. Check if player is standing on the ledge and measure the step height. If theres a difference in step height, add a force to push the player.
     
    Kreshi likes this.
  47. JonathanCel

    JonathanCel

    Joined:
    Feb 17, 2021
    Posts:
    15
    Or...
    They could've built it properly the first time around, so we don't need to fill our game logic with expensive ray casts from managed code, and we don't end up with a dozen half baked amateurish solutions, with multiple "easy fixes".

    Plus, if you've worked through it, there's a ton of edge cases that need solved (sloped edges meeting flat ones, sloped edges over a drop, sloped edges with gaps, etc).
     
  48. Andy-Touch

    Andy-Touch

    A Moon Shaped Bool Unity Legend

    Joined:
    May 5, 2014
    Posts:
    1,290
    Just a friendly reminder that the people who originally worked on this first iteration of the Starter Assets left Unity back at the end of June. Im not sure who actually maintains them now (Last release date on Asset Store was May).

    I hope someone at Unity has adopted them (Especially as they are shipped to everyone on Unity Hub) and either re-evaluates them or builds on top of them based on the useful feedback here. :)
     
    DEEnvironment likes this.
  49. rhidgerdm

    rhidgerdm

    Joined:
    Sep 22, 2022
    Posts:
    1
    Hello guys, could someone help me, I downloaded the starter to make a game but I'm having problems with the ThirdPersonController script, this error appears on the console and I can't play the game:
    " error CS1061: 'PlayerInput' does not contain a definition for 'currentControlScheme' and no accessible extension method 'currentControlScheme' accepting a first argument of type 'PlayerInput' could be found (are you missing a using directive or an assembly reference?)".
    Does anyone have any idea how to solve it, I'm new to programming and I don't know what to do, thank you in advance.
     
  50. Adnan_SMB

    Adnan_SMB

    Joined:
    Apr 16, 2022
    Posts:
    1
    Hello!

    It's a very helpful asset but I've got a problem... I am trying to implement touch controls and followed the tutorial and it doesn't seems to work I have attached the player armature to the canvas and have the event system is also there here are the screenshots.
     

    Attached Files:

    • 1.png
      1.png
      File size:
      213 KB
      Views:
      9
    • 2.png
      2.png
      File size:
      337.3 KB
      Views:
      9
    • 3.png
      3.png
      File size:
      341.2 KB
      Views:
      9
    • 4.png
      4.png
      File size:
      324.7 KB
      Views:
      9
    • 5.png
      5.png
      File size:
      326.4 KB
      Views:
      8