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 Higgyfish · Jul 17, 2012 at 12:59 AM · javascriptmovementcharacterplanerpg

Basic Movement on a Plane without Character Controller

Hello,

What I'm currently trying to do is create simple movement on a plane (with slopes). I would use the built-in character controllers, but it's movement is based off physics, which my game does not need. I just need a way for my character to keep in contact with the plane, while being able to move in eight directions. Any help is appreciated. :D

Thanks in advance!

Comment
Add comment · Show 1
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 Avaista · Jul 17, 2012 at 03:16 AM 0
Share

I don't think the built int character controller uses physics(I think that's the point of it actually) While it is true that Simple$$anonymous$$ove automatically applies gravity and calculates your movement in meters/second, $$anonymous$$ove does not, it just keeps you from walking through stuff.

I can understand not needing physics, but Character Controller is way more than just that (See Skin Width, see Collision Flags).

If you don't $$anonymous$$d me asking, what is wrong with using it for your game, exactly?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Piflik · Jul 17, 2012 at 01:05 AM

Well then...transform.Translate(Vector3(Input.GetAxis("Horizontal"), 0, Input.GetAxis("Vertical"))) for the eight direction. To keep the player on the plane, do a raycast and place the player on the intersection point with the plane (probably you need two raycasts, one straight down, one straight up)

Comment
Add comment · Show 4 · 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 Higgyfish · Jul 17, 2012 at 01:26 AM 0
Share

How would I go about doing the raycasts?

avatar image vanofthedawn12 · Jul 17, 2012 at 02:46 AM 0
Share

it depends on what you want.. the raycast provides many overload methods so you can choose what you want to use based on your given data..

avatar image vanofthedawn12 · Jul 17, 2012 at 02:49 AM 0
Share

would this help ? http://www.unity3dstudent.com/2010/08/intermediate-i01-raycasting/

avatar image Bunny83 · Jul 17, 2012 at 03:28 AM 0
Share

@Higgyfish: Don't post further questions as answer. I've converted your answer into a comment.

I still don't get why you don't want to use the CharacterController? don't get me wrong, i talk about the component, not about the FPS or TPC scripts that comes with the standard assets.

The character controller is a component to move an object without physics (it's not influenced by external forces), but you still have collisions which you usually want.

Feel free to edit your question to add some more details. Btw a plane is always flat. When your "level" has slopes / hills ... it's not a plane. For real plane-movement you don't need to worry about the height.

avatar image
0

Answer by sam32x · Jul 17, 2012 at 03:44 AM

you could make trigger checkpoints and then make a script so whenever a car goes through the checkpoint a number goes up, and then when the player goes through the checkpoint sends the number to the car and then it gets displayed on the screen as the position, but you would have to make sure the checkpoint isn't touching anything else and you would need one every few seconds or the counter wouldn't update enough.

Comment
Add comment · Show 1 · 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 Avaista · Jul 17, 2012 at 04:18 AM 1
Share

brother, I believe you may be in the wrong question, lol

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

9 People are following this question.

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

Related Questions

Character Attributes Question 1 Answer

Stick an object to the ground while moving? 1 Answer

How to add accelerometer controls to this script? 0 Answers

counting seconds that character is idle. 1 Answer

Third Person type Rpg movement 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