• 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 brain56 · May 24, 2012 at 06:58 AM · physicsrigidbodyforce

What unit does Rigidbody.AddForce() use?

I'm trying to add a 3 world units per second force (or velocity) to a Rigidbody, and so I found the AddForce() method. I tried rigidbody.AddForce(Vector3.up*3) but it didn't produce the result I wanted.

What unit does the AddForce() method use? Or better yet, any ideas on how I can produce the effect I want? Thanks!

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 brain56 · May 24, 2012 at 07:19 AM 0
Share

Yeah, I understand that perfectly. But without knowing the units, I really can't get my desired results. Of course, I can brute force, but that's not very efficient and accurate.

2 Replies

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

Answer by hijinxbassist · May 24, 2012 at 07:20 AM

Actually, someone asked this before. Before posting a question, do a search through the database to see if you question has already been asked/answered. http://answers.unity3d.com/questions/18182/rigidbodyaddforce-is-in-what-units.html>Here is the link to the answer i found upon first search.

Comment
Add comment · Show 3 · 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 hijinxbassist · May 24, 2012 at 07:26 AM 0
Share

For searching, i use google and add unity to the beginning of the search topic. This is what i typed, "unity add force unit". It was the second link, the title was clear enough for me to make the decision to proceed following the link. Hope that helps you in future inquires.

avatar image brain56 · May 24, 2012 at 08:15 AM 0
Share

Oh, sorry about that. I tried searching but I must have been looking at the wrong places. :P

Thanks! And sorry for the trouble! :)

avatar image hijinxbassist · May 24, 2012 at 08:32 AM 1
Share

absolutely no trouble. I picked up that search technique early on, and it has been a life saver and helps me help others quick & effectively. I use it to get the unity reference as well if i dont have the unity ref page open already. i usually type something like, "unity TOPIC ref" works well 93.6% of the time :P

avatar image
0

Answer by save · May 24, 2012 at 07:24 AM

AddForce() is just adding to the total velocity which is in Unity-units per second. The impact of the force is heavily connected to the mass, momentum and friction of the rigidbody which makes it non-measurable in a simple way. You can check if the velocity is good enough, if it isn't then add more force to the rigidbody.

 function FixedUpdate () {
     if (rigidbody.velocity.y<3) rigidbody.AddForce(Vector3.up*3);
 }

You can also alter the velocity directly, which will produce a non-realistic result:

 rigidbody.velocity = Vector3.up*3;
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 brain56 · May 24, 2012 at 08:16 AM 0
Share

Thanks! I found your suggestion helpful as well!

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Predicting land position with drag applied 0 Answers

What is the best way to apply force, then come to a smooth stop on control release? 1 Answer

Calculating required force for pushing a body to a desired position at once 0 Answers

increasing knockback of a rigidbody as received damage increases (like super smash) 1 Answer

Tornado throwing back force after pulling 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