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
0
Question by Rhapsodus · May 19, 2011 at 07:56 PM · physicswheel colliders

Physics - Using wheel colliders for 2d

I am making a motocross type game that is 2d based and I was wondering what advice anyone has for attempting to make physics similar to line rider ?

So far I have tried to use wheel colliders to create a motorcycle, and created a track where all colliders on planar. But in playing what I have made so far, I have an issue with the wheel colliders in the sense that they don't seem very responsive. As in an increase to motorTorque doesn't increase velocity immediately, or they flip over too easily at the slightest drop.

I have tried tricks like moving the center of mass around, and or adding counter balance weights, but I think I am missing something more fundamental. Also when going up hill wheel colliders dont seem to give that response to 'throttling' correctly, and/or flip over backwards when gassing too much.

Right now my scripts apply the same motor torque to all wheels equally and even though its an orthogonal camera, in world space there are really 4 wheels.

Anyways, if I could get some advice on at least getting to line rider, that would be an immense lead

Comment
Add comment · Show 3
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 Peter G · May 20, 2011 at 02:58 AM 0
Share

I doubt being in 2D space has anything to do with your problem.

avatar image Rhapsodus · May 20, 2011 at 06:43 PM 0
Share

Right, my camera settings have nothing to do with the top heavy feeling of attempting to create a motocross style bmx bike. It seems to 'tumble' really easily, I searched around for stability strategies and haven't found one in regards to a bike, but tons of examples on dealing with a GTA type car.

avatar image Rhapsodus · May 20, 2011 at 06:43 PM 0
Share

Right, my camera settings have nothing to do with the top heavy feeling of attempting to create a motocross style bmx bike. It seems to 'tumble' really easily, I searched around for stability strategies and haven't found one in regards to a bike, but tons of examples on dealing with a GTA type car.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Edy · May 20, 2011 at 11:34 PM

Edit the parameter stiffness at the WheelColliders friction curves (forwardFriction and sidewaysFriction). Use values between 0.01 and 0.04. This gives the WheelCollider a more realistic behavior. Note that the default stiffness value (1.0) configures a tire with almost infinite grip, so it cannot slide and the vehicle flips over.

As your game is 2D, then you can easily set up your motorcycle by configuring the rigidbody constraints. I'm assuming that your model's orientation heads to the Z+ axis. You can set it up to move in the 2D plane only (disable the X checkbox for movement, allow vertical Y and longitudinal Z) and rotate longitudinally only (disable Y and Z checkboxes for rotation, allow X only).

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

2 People are following this question.

avatar image avatar image

Related Questions

Setting Wheelcollider BrakeTorque to 0 does not release brake 0 Answers

Wheel collider bounce backward 1 Answer

cube on 2 wheelcolliders 0 Answers

2D 360 degress platformer example needed 0 Answers

The car flies away when wheel collider touch walls or other objects 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