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
1
Question by Luke 1 · Mar 12, 2010 at 09:16 AM · physicsbikewheel-collider

How do I model a bike's physics?

Hi, I'm struggling a bit with modelling the physics for a pedal bike in Unity. I have set up a wheel-collider in an empty game object for each of the wheels. Thinking about the real world physics, it would make sense to apply the motion torque only to the back wheel, and steer with the front, but that doesn't appear to work. So applying motion torque to the front wheel and steering with it kind of works in that it changes the direction of the bike, but the bike itself remains parallel with it's starting position and doesn't turn to follow where the bike is heading.

Is what I want to do possible with wheel-colliders, or should I be looking at alternatives? I remember seeing a Unite presentation with the guys from Blurst who said they gave up on wheel-colliders and rolled their own raycast based solution for Raptor Safari.

Thanks,

Luke

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by duck · Mar 12, 2010 at 01:14 PM

I think wheel colliders would be fine as a start, but you're almost definitely going to have to do a certain amount of "fake" physics tweaking to get the bike to stay upright, and to get it to lean the correct amount to give a realistic turning effect, because it will be incredibly difficult to make it maintain these positions as a natural emergent result of the physics engine.

This means you probably can't just let the user apply force, and steer the front wheel. I think you're going to have to implement virtual training wheels of some description!

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
-1

Answer by Luke 1 · Mar 12, 2010 at 11:54 AM

I might have had freeze rotation on on the rigidbody ... oops!

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 Lipis · Mar 12, 2010 at 03:26 PM 0
Share

@Luke, this area here is only for answers to the above question.. everything else should be comments..!

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

No one has followed this question yet.

Related Questions

Bike gravity fails 1 Answer

Remove all forces on a wheel Collider 1 Answer

Animation and Physic 0 Answers

Ragdoll elongates on Bike 0 Answers

Balancing in a bike game 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