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 dre38w · Nov 16, 2011 at 03:40 AM · physicsrigidbodycarramp

Raycast car rig going up ramps/slopes.

I have a car rig using raycasts instead of wheel colliders but my biggest problem so far is finding the right way to go about having the car go up ramps or slopes. I'm thinking that I would need to tell it to rotate but that opens some problems when at high speeds. What direction should I be heading to do this? I'm grateful for any suggestions.

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 syclamoth · Nov 16, 2011 at 03:46 AM 0
Share

Could you have additional raycasts which go out the front and back, for this purpose?

avatar image dre38w · Nov 16, 2011 at 03:50 AM 0
Share

I've actually tried that as well. $$anonymous$$y biggest thing is how would the actual car be moved/rotated? I would assume it would need some sort of command telling it to rotate correct?

avatar image syclamoth · Nov 16, 2011 at 03:53 AM 0
Share

Well, there are a few things. It all depends on how your car works on the inside! Is it a rigidbody?

avatar image syclamoth · Nov 16, 2011 at 06:11 AM 1
Share

No, don't bother. It's a pretty complex problem, and I don't think I'll be able to give you a complete solution. I can give you tips, but you'll have to do the experiments yourself.

avatar image dre38w · Nov 16, 2011 at 05:22 PM 1
Share

haha Gotcha. That's what I prefer anyway. I don't really like being given the answer. Defeats the purpose of problem solving which is one of the reasons I enjoy coding. Frustrating as it may be. haha So would I be literally telling the car to rotate with one of the various rotate commands, torque, move rotation, so forth, when going up ramps and tell it to rotate further until the forward raycast is no longer colliding with the ground? Or do I go about it some other way? Because I've been forcefully rotating it as such but it's too clunky and unresponsive at higher speeds. And I can't figure how a directional force would rotate the car when it's a directional thing. Thank you for your help so far.

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

car wheels brakes 2d 1 Answer

Should my character controller slide down a ramp when I apply gravity to it? 2 Answers

Are y-axis wheelcolliders possible? 1 Answer

Wheel Collider - Mesh/Box Collider Problem 0 Answers

Turning Rigid body currently in contact with ground. 1 Answer


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