Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by CallanCaustic · Oct 27, 2020 at 07:00 AM · fpsslidingcrouching

Crouch and Slide FPS Character Controller

I was wondering if someone had perhaps made a crouch and slide script for the FPS Character that comes with the unity standard assets, that I would be able to just copy and paste? I have 0 coding knowledge and don't know how to do it myself, thanks for any and all help.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Llama_w_2Ls · Oct 27, 2020 at 05:35 PM 0
Share

If you have 0 coding knowledge, to be frank, go get some. Because if someone hands you code that you copy + paste, that you dont understand, in the future, you're going to be re-using this wizardry/magic that fell out from the sky and if it causes issues, you're going to end up in the same cycle. Asking for help on the same issue, without taking a crack at it yourself.

Anyways, to help you out: $$anonymous$$aybe change the y position of the camera on button press (crouching to make you look smaller) and set running to true (to imitate sliding).

avatar image CallanCaustic Llama_w_2Ls · Oct 28, 2020 at 06:23 AM 0
Share

yeah I'm still learning. that's the main reason i was asking, I'm not planning on being lazy, i just wanted something i could maybe take apart and use for reference, as well as a quick fix

avatar image CallanCaustic Llama_w_2Ls · Oct 28, 2020 at 10:01 AM 0
Share

also yea that could work, but what i was thinking was you would go in one direction only for a small duration of time, being able to change camera facing direction, and being able to cancel the slide somehow, but not being able to change the sliding direction. thanks for the response btw.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by arvindchetu · Oct 28, 2020 at 01:17 PM

Try this:-

 Private void Update() {  
     if( Input.GetKeyDown(KeyCode.A)) {
         animation.CrossFade("crouch", 0.5f);
     }
     else if( Input.GetKeyUp(KeyCode.A)){
         animation.CrossFade("idle", 0.5f);
     }  


You can learn basic “Animation controlling techniques through scripts” over here… https://learn.unity.com/tutorial/controlling-animation

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by CallanCaustic · Oct 29, 2020 at 07:23 AM

@arvindchetu didn't seem to do anything. are you sure that's for the First Person controller? not the Third Person Controller?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

186 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Sprint and Crouch problem! 1 Answer

How to make a Fps sliding mechanic like in Far Cry? 0 Answers

How do I make sliding last for a definite number of time 1 Answer

Crouch Script that doesn't clip into the object above you when uncrouching. 0 Answers

Fps controller physics 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges