Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
2
Question by Xypherorion · Jan 26, 2016 at 12:23 PM · physicsgravitywheelcollidervehicle

Is there any way to tell a wheel collider which way gravity is without Physics.Gravity?

I have an alternate gravity system in the works, and things have been going quite swimmingly, until i tried to implement vehicles. It appears that if I change Physics.Gravity to (0, 0, 0), while still applying force to the rigidbody in the direction of gravity (0, -9.81, 0), it no longer understands how to grip the ground, and therefore does not move when I attempt to. It also slides to the side as if it were touching a surface with zero friction after it hits the ground.

I had thought perhaps there were a way to alter Physics.Gravity before and after the WheelCollider calculations for only affected objects, but there does not seem to be a way to order scripts to do it this way either.

Comment
Add comment · Show 2
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 Xypherorion · Jan 25, 2016 at 11:10 PM 0
Share

To clarify, everything seems to work except for the wheel collider grip. The spring and damper works fine, physics reactions are correct, just no wheel friction.

avatar image Xypherorion · Jan 26, 2016 at 04:08 AM 0
Share

Further Investigation has resulted in understanding that it doesn't seem to matter which direction a gravity value faces in Physics.Gravity, as long as its magnitude matches the currently desired gravity value.

2 Replies

· Add your reply
  • Sort: 
avatar image
-1

Answer by raulius · Jan 15, 2018 at 05:56 AM

Hi, did you find a solution for this? I'm working on a car game using a custom circular gravity, and thought about asking you before approaching how to use wheel colliders over a sphere with gravity. Cheers

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 SamFernGamer4k · Sep 19, 2021 at 01:36 AM

This post is old, but it might help someone that comes here. Maybe the best option is to create your own wheel collider script. There are advantages, like being able to add more settings and even use curves instead of individual values.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Wheelcollider Settings to Match Default Unity 4 0 Answers

Unity Car Controller Collision Reverse 1 Answer

Why does my car re-align after drift into the original direction? 0 Answers

Issue using wheelColliders around sphere 1 Answer

Wheel Collider Tilt? 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