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 /
  • Help Room /
avatar image
0
Question by xetro · May 30, 2017 at 10:33 AM · physicswheel collidersskateboard

Skateboard physics and Wheel Colliders

Hi, I'm learning Unity and haven't done much but a few tutorials, so please bear with me. I've been trying to simulate skateboard physics so what I want is a skate object that has Rigidbody and I want to move it around applying forces and not transform.

I've been trying to use wheel colliders but I ran into problems. My setup is Skate game object with Rigidbody and a script that pushes is when button is pressed, then I have child game objects with meshes and colliders and also 4 child objects with wheel colliders. Since I don't want any suspension I set Suspension distance and Force App point distance to 0. All Suspension Spring settings are at 0 and Wheel Damping Ratio at 0.0001. Wheel Mass is at 0.10 (100g), Radius at 0.003. Everything else is left Default. Also in my PlayerController script I set motorTorque for all my wheel colliders to 0.000001f.

The problem is that my Skateboard starts to jitter and twitch when I start the game, it moves forward when force is applied, but you can see the wheel colliders are not turning.

I have mass of 2.5 on my Rigidbody, because I want to be same as real world weight for realistic physics (2.5kg). I've read that you should use bigger mass, with wheel colliders because of the suspension settings, but I have those set to 0. If I increase mass of my skate object, wheel colliders start to roll correctly when force is applied, but the jittering still persists although it's less noticable.

My main question is is my approach correct? Since all examples of wheel colliders I found were using them to apply torque and move the vehicle forward, but I just want them to spin freely (wheels don't move the object, pushing the object makes wheels roll). Are wheel colliders the right way to go, and I just need to adjust some settings to get it work properly, or should light objects with free spinning wheels be approached in a different way?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by TheNightfly · Jul 09, 2017 at 01:00 AM

If you want just the illusion of the wheels rolling you might just get rid of the wheel colliders and have the wheels spin using transform rotate*the z forward motion of the board. You could also create a spin variable that you could multiply the wheels transform.rotate by to tweak how much the wheels visibly rotate so it looks correct for how much the board moves forward or backward.

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

141 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 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 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Wheel Collider problem 1 Answer

I would like to better understand the physics of wheel colliders. 0 Answers

How to make the skateboarder rotate 0 Answers

When key pressed addforce,How do I add force when key pressed. Skating physics 0 Answers

Wheel Colliders - Cannot Attach to Vehicle/Super huge??? 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