![]() I'm currently working through some of the logic, so the initial post will get a few edits e.g just fixed sliding or sprinting while wedged under a ceiling, now adding a velocity check so the player has to be moving before sliding. The jump crouch was left intentionally, after many years of using this Source engine mechanic in Team Fortress 2 Set the capsule gfx layer also, just in case.Ĭhanged the layer message to an error and warning message, to hopefully attract attention.Īdded an error message for the Main Camera not found, then creates example camera. The initial script has been updated, changes are : And your mouse smoothing made a huge improvement to the Brackeys controller. Ĭlick to expand.Thank you for the feedback. that's better than most Windows software. I tried it like a zillion more times and it never happened again, but there you go, repro rate of 1 / zillion. hm.īUT! As a consequence of crouching midair, I was able to fall through a 1m-thick X/Z-stretched cube floor ONCE by uncrouching right as I landed. Although technically IRL there's nothing to keep you from crouching midair. I didn't even notice the nice yellow warning until the second or third try.įinally, I know it's just nitpicking, but I am actually able to crouch/uncrouch while in the air, and that seems. make a stronger call to action for setting up the custom Player layer: I saw it set up Ignore Raycast so I just left it at that and my jumps didn't work. complain bitterly if there is no camera, or even create one afresh and stick it in place ![]() The whole point of this is no-muss no-fuss and this is definitely so. ![]() Toggle lock cursor with the ` console key Ĭlick to expand.Seems pretty legit! I like your setup menu item too. The Slope Limit variable is in the CharacterController component. When in play mode it also shows a blue line as the slope direction, and a green line as the player gravity and when slipping down steep slopes. Under Debug, check the box to show where the grounded spherecast starts and ends (starts inside the base of the capsule and then up for the default skin width, set with the groundCheckY variable).Under Grounded Settings, set Casting Mask to Everything, then uncheck the Player layer (it then shows mixed, you can click to confirm) In the Inspector, drag in the Camera (and GFX if created). Set the Transform Position to X 0, Y 1, Z 0 (Rotation 0, Scale 1) (optional player graphic object) Create a cylinder as a child of the Player gameobject.Set the Transform Position to X 0, Y 1.7, Z 0 (Rotation 0, Scale 1) Drag the Main Camera as a child of the Player gameobject.Change the Center variable on the CharacterController component to X 0, Y 1, Z 0 This will also add the CharacterController component. Click on the Player gameobject and confirm the Layer is assigned as Player Click on the button next to Layer > Add Layer. Create and assign a Layer for the Player gameobject.The Player gameobject needs it's own layer, then the Culling Mask has to be assigned to ignore that layer, so the raycasts can detect the world and not the player. By default (for easy use in new projects), it assigns the Ignore Raycast layer. Setup : the menu item does everything below, except for creating the player layer. Made in Unity 2018.4, it's been a long time since I even opened Unity, so I don't know what the standard assets are like these days, or what else is out there. ![]() It also has the basic function to affect non-kinematic rigidbodies. There is a check to see if there is enough headroom to stand from crouching (it hasn't pushed through the floor yet.). Otherwise very easy to set up, it only requires a layer to exclude itself from sphere/raycasts. There is a Menu Item function to easily create and configure a new FPCC object. ![]() After some interest in an old post here, I spent the weekend frankensteining snippets of code to make a single script FPCC that could be used like the FPCC from Unity 4~5, including the crouch and run from Aldo, and I also added farcry sliding. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |