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 smirlianos · Jan 06, 2013 at 06:42 PM · physicsrigidbodygravityforcemass

What's the Rigidbody's gravity unit?

I want to make a physics simulator for school, and I want a rigidbody that makes a free fall by gravity force. (9,81 N).

When I apply to a cube the rigidbody, and set the mass to 4kg, it should take 0,5 seconds normaly to fall from a heigh of 10m. However, it needs 1+ seconds to fall, with every mass I put.(It's the same with 1kg and 1000000000 kg)

Why is this happening?

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 AlucardJay · Jan 06, 2013 at 07:07 PM 1
Share

You should then know that mass is not a factor : In the fourth century B.C., Aristotle maintained that an object falls with a speed proportionate to its weight that is, the heavier the object, the faster it falls. This idea was generally accepted until the 17th century, when Galileo showed that the rate of fall caused by gravity is the same for all objects.

http://science.howstuffworks.com/falling-bodies-info.htm

anyway, in regard to your problem, I just did a test and I think you are correct! Here is my script, attach it to the rigidbody, set the rigidbody inspector to use gravity = false, is$$anonymous$$inematic = true. When you click the L$$anonymous$$B then is$$anonymous$$inematic is disabled and gravity is enabled, the object falls and the timer starts. When it hits something, the timer stops :

 #pragma strict
 
 var rigid : Rigidbody;
 var isTi$$anonymous$$g : boolean = false;
 var timer : float = 0.0;
 
 function Start() 
 {
     if ( !rigid )
     {
         rigid = this.gameObject.rigidbody;
     }
 }
 
 function Update() 
 {
     if ( Input.Get$$anonymous$$ouseButtonDown(0) )
     {
         rigid.is$$anonymous$$inematic = false;
         rigid.useGravity = true;
         
         isTi$$anonymous$$g = true;
     }
     
     if ( isTi$$anonymous$$g )
     {
         timer += Time.deltaTime;
     }
 }
 
 function OnGUI()
 {
     GUI.Box( Rect( 10, 10, 100, 35 ), "" + rigid.velocity.magnitude.ToString() );
     GUI.Box( Rect( 10, 55, 100, 35 ), "timer " + timer.ToString() );
 }
 
 function OnCollisionEnter( other : Collision )
 {
     isTi$$anonymous$$g = false;
 }

1 Reply

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

Answer by $$anonymous$$ · Jan 06, 2013 at 07:12 PM

In fact no matter how heavy an object is, it takes equal amount of time for it to fall as any other object. Gravity in this perspective is not a "force" but an acceleration. It's value is not measured in Newton, but m/s^2, aka. acceleration. While I don't know exactly what units the underlying PhysX system works with, you can query (and set) the value for gravity with Physics.gravity which is a Vector3, and also visually in Edit / Project Settings / Physics.

You can also set a rigidbody's Drag property, which according to the docs corresponds to air resistance. 0 is no air resistance, and if it's infinity, the object stops moving.

I guess your best shot is to come up with a [gravity value, object mass, distance scale] combination that makes sense for you for a unit-weight object, and build your simulation based on that agreeable combination of values. (for example find a setting where your object falls in 0.5 seconds the desired distance (which may not be exactly 10 unity-units), and use that as the scale for everything else in your scene).

You can use alucardj's neat script for the timing.

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

10 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

Related Questions

How to make a object jump constantly at y and move to the next position to z (perfectly) 0 Answers

Simulate gravity on rigidbody 1 Answer

Gravity is preventing object from moving straight toward its direction when calling rigidbody.AddForce... 1 Answer

Tornado throwing back force after pulling 1 Answer

Artificial Gravity 2 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