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 Zipe92 · Dec 29, 2015 at 08:46 AM · physicsrigidbodyaddforcemomentum

AddForce and Momentum‏

Hi guys.

I have a problem with the Physics Engine. Few days ago I started working with Physics, so maybe this is a stupid question.

I have a drone, with different gameobjects as children, rotor 1, rotor 2, etc., every gameobject has its own Rigidbody with gravity enabled.

I want to drive the drone using AddForce, but it seems that it doesn't generate the momentum. For example, if I use add force only on one rotor (so it shouldn't be balanced) the drone remains parallel to the ground and this is irrealistic.

Can anyone help me please?

Thank in advance.

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 Gnorpelzwerg · Dec 29, 2015 at 09:39 AM 0
Share

try Rigidbody.AddForceAtPosition( ... ). It should give you a more pleasant result. http://docs.unity3d.com/ScriptReference/Rigidbody.html

avatar image Zipe92 Gnorpelzwerg · Dec 29, 2015 at 09:52 AM 0
Share

Thank you for your reply.

I have already done some experiments with AddForce, AddForceAtPosition, AddRelativeForce but no one works.

This is my simple code:

 Vector3 t = Physics.gravity * total$$anonymous$$ass;
 //rotor1.AddForce(- t / 4f);
 //rotor2.AddForce(- t / 4f);
 //rotor3.AddForce(- t / 4f);
 rotor4.AddForceAtPosition (- t, rotor4.transform.position);

With this code, applying ALL the force on the rotor 4, the drone stay in equilibrium and I don't understand why.

1 Reply

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

Answer by Zipe92 · Dec 29, 2015 at 12:42 PM

I figured out what is the problem!

The drone model that I'm using have a very bad mesh, every mesh in the drone has the center in the center of the drone, so AddForce applies a force at the center of the drone and stays always in equilibrium!

Now I added other fake gameobjects in the position of the rotors and applying the force to these gameobjects it works!

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

34 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

Related Questions

Ball Speed is not increasing as per code 0 Answers

How do I get objects in front of the player to be blasted away? 1 Answer

How to remove addforce effect 0 Answers

AddForce in Coroutine 1 Answer

Script makes plane point in general direction but doesn't point fully... read description please! 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