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 SohaibTheGame · May 01, 2013 at 01:04 PM · physicsrotatecarvehicle

Car goes a bit left when moving

Hello, i'm making a car project, i made 4 wheel colliders and made the 2 rear wheels move the war with motor torque, the problem is , i'm only using forward/backward movements, the car moves a bit to left / right when i change between forward and backward,

this is the car script, and below it the web player link if you want to give the game a try yourself

 #pragma strict
 var BackLeft : WheelCollider;
 var BackRight : WheelCollider;
 var VBR : Transform;
 var VBL : Transform;
 var VFR : Transform;
 var VFL : Transform;
 
 function Start () {
 
 }
 function Accelerate () {
 BackLeft.motorTorque = Input.GetAxis("Vertical") * 100;
 BackRight.motorTorque = Input.GetAxis("Vertical") * 100;
 }
 function Visual () {
 
 VBR.Rotate(Input.GetAxis("Vertical") * 100 * Time.deltaTime, 0, 0);
 VBL.Rotate(Input.GetAxis("Vertical") * 100 * Time.deltaTime, 0, 0);
 VFR.Rotate(Input.GetAxis("Vertical") * 100 * Time.deltaTime, 0, 0);
 VFL.Rotate(Input.GetAxis("Vertical") * 100 * Time.deltaTime, 0, 0);
 }
 function FixedUpdate () {
 Accelerate();
 Visual();
 }

www.neoxads.com/sohaib/Screennie/Screennies.html

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 Fornoreason1000 · May 01, 2013 at 01:34 PM 0
Share

one wheel might be starting before the other

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by pudd1nG · May 01, 2013 at 03:55 PM

This is a pretty well known 'bug' or effect with the sideways slip value of the wheel collider. You can get rid of the issue by setting the sideways slip to a high value, however you then get a very 'sticky' wheel.

I'm going to guess you're driving on a completely flat plane - when I've created a wheel collider object on rough terrain I've never had the issue.

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 UnityManvith · Jan 29, 2018 at 09:38 AM 0
Share

how to add friction ?? can you please tell me....

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

15 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

Related Questions

Getting contact force between two rigidbodies 1 Answer

Vehicle engine RPM without wheelcolliders? 1 Answer

How to make a car not slow down while turning? 2 Answers

Raycast align with ground normal 2 Answers

CarController Script Error 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