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
-1
Question by leandroreschke · Jun 30, 2014 at 01:51 AM · physicscardynamically

Make car CenterOfMass change dynamically

Can some one give me directions to start a dynamically script to change the center of mass, like car simulation, in real life if you are ate like 20 km/h and max turn it will only skid because the velocity doesn't changed to much the center of mass, but if you turn at like 120km with max turning value the center of mass will likely get all to the opposite side that you have turned and will make the car roll a lot until the air resistence stop the velocity and the center of mass return to where it was idle.

I don't want a complexe physic script made by someone, i just want a direction to go, a logic to change the center of mass on the go dynamically.

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 Kiwasi · Jun 30, 2014 at 10:52 AM 0
Share

If you did want to change the centre of mass (which you don't) you could use another rigidbody with appropriate joints.

avatar image incorrect · Jun 30, 2014 at 11:12 AM 0
Share

will make the car roll a lot until the air resistence stop the velocity

I'm sorry for off-top, but that's not how it works.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by hav_ngs_ru · Jun 30, 2014 at 06:04 AM

actually, the center of mass stays where it was. The inertia and the friction of the wheels causes the car to turnover. And the suspension elasticity make the car off the ground (to roll a lot in air).

So I see some ways to make what you want:

the first is to use a physics materials for wheels (to make a grip enough to make car turnover instead of just drift) and a spring joints between body and wheels to make a car "jump". without scripts.

the second - is to make a car just a box (with no wheels) and use anisotropic friction setting of physics material (to make a car slide toward and to cling the ground when moving sideways). it would be enough to make car turnover. If you wish to make it off the ground - you may add a force in script (depends on angle between velocity vector and the forward vector of the car body).

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 leandroreschke · Jun 30, 2014 at 06:22 AM 0
Share

hum, so i missed the point and you have clarified the path for me, really thanks, i forgot about spring joints, so wheel collider springs stay where they are?

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

24 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

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Hit problem unity 1 Answer

Physics driven cars without Wheel Colliders. Is it practicable? 1 Answer

Custom Physics? 2 Answers

Moving a rigidbody onto exact mouse position using rigidbody.MovePosition? 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