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 /
This question was closed May 27, 2014 at 05:55 PM by AlucardJay for the following reason:

Too subjective and argumentative

avatar image
0
Question by Iggy_0723 · May 27, 2014 at 03:09 AM · c#physicsmovement script

Player Movement Help

No matter what I try I can't seem to get my player to move properly. I have tried coding using vector3 so that the player would move in the direction of the key that they pressed. The movement was jerky and uncomfortable and I would not want to use that for the entirety of the game. It also gave me a problem with jumping. I would go up and not come down, so I added a rigidbody to the player and it just fell over (I was using a capsule btw). I also tried adding forces to the rigidbody and it did the same exact thing. I just want a script that will allow the player to move around smoothly and jump properly, but nothing I am trying seems to be working.

Comment
Add comment · Show 10
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 Clet_ · May 27, 2014 at 03:44 AM 1
Share

How about using the CharacterController and the Character$$anonymous$$otor from the standard assets?

avatar image Iggy_0723 · May 27, 2014 at 03:51 AM 0
Share

I won't learn that way. I understand that they're there, but again I want to learn how to do it myself. I'm also sure that those are coded in javascript, and I have no idea if that will have any impact on any of my other scripts because I am coding in C#.

avatar image AlucardJay · May 27, 2014 at 05:18 AM 0
Share
  • http://wiki.unity3d.com/index.php/Scripts/Controllers

  • http://www.youtube.com/playlist?list=PLbghT7$$anonymous$$mckI4su9o$$anonymous$$noLuoRYLUv$$anonymous$$lek7j

  • http://www.youtube.com/playlist?list=PL7AE076AFAFD3C305

avatar image Radivarig · May 27, 2014 at 05:23 AM 0
Share
 -make a cube 
 -add colliders and rigidbody 
 -put the cube above the terrain so the colliders don't intersect 
 -hit play, if the cube doesn't fall trought but stays on the terrain, cool. 
 -now make a new c# script and drag it on the cube -inside Update make a trigger for jump, something like if(Input.$$anonymous$$eyCode($$anonymous$$eyCode.Space)) 
 -now you can use Addforce() 
 -also you have to track if the player is already in the air, so you don't jump more than once before hitting the ground again, that is called a ground check 
 -to move you can use Translate(), it adds a vector(x,y,z) to position of the gameObjects transform every frame.

In general I would suggest that you don't try to implement the whole thing from scratch, but rather after creating these basics and learning how they work, grab the standard character controller and modify it to your needs.

Radivarig

avatar image AlucardJay · May 27, 2014 at 10:00 PM 2
Share

In reply to the comment on this thread :

  • have no clue of why you closed the thread that I made. Nothing was wrong with it and I was really trying to get help since I am a pseudo-novice at program$$anonymous$$g. Please refrain from closing any of my future threads, as I would like to take as much help as I could get. "Too subjective and argumentative" is not really a reason why you should have closed the thread, and honestly most of the people who commented were helpful. Again, please refrain from doing this because I was asking for help, not you. Closing a thread prematurely like that will not solve my issue.*

From the question : I just want a script that will allow the player to move around smoothly and jump properly

I closed this because as it currently reads, you are asking for a controller script. If you had shown the script you were working on, that would've been a suitable question and people would've been able to expand and give advice on your code. But as you have not shown your current code, nor specified if you are using a character controller or a rigidbody, the question is vague, unspecific, and unanswerable.

There are a million resources out there on making a controller (I have linked just a few in my above comment, these were given to help you), so this is also a duplicate question.

As there is no 'one true way' of making a controller, it is impossible to give a singular answer, hence the reason 'Too subjective and argumentative'. Controllers are varied and built to suit the needs of the project.

I encourage you to keep learning; search, read and do many tutorials. Only then will you get a better understanding of coding.

However, when a question is unspecific, lacking in detail or appear as a 'write-my-code' questions, I shall continue to close them.

Show more comments

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

26 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

Related Questions

Multiple Cars not working 1 Answer

Similar movement to a game (look description) 1 Answer

Moving a player with Rigidbody 2 Answers

Distribute terrain in zones 3 Answers

Scripting and Coding Dictionary 0 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