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 Natanijel · Oct 26, 2012 at 12:02 AM · physicsgravitykinematicrigid body

Does gravity affect kinematic objects?

Hello

This is my first post on Unity Answers and I would be grateful if anyone can help me with a small problem I am having

I have my rigid bodies in my scene, and they are everywhere. I made a script so that if a rigid body is not being looked at, it stops simulating it (becomes Kinematic). Then, if you look at the rigid body, it continues to simulate from where it left off.

This works fine when the gravity feature is disabled, but when It is enabled, it doesn't. Does anyone have a suggestion why this might be? Does the gravity affect kinematic objects?

Thanks for the help, Nat ---||---

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Kryptos · Oct 26, 2012 at 08:15 AM

Kinematic rigidbodies are not affected by any forces (including gravity).

But it is possible that the velocity that was previously set (before switching to kinematic) was not zero (especially if gravity was enabled). Therefore, when switching back to nonkinematic, the rigidbody starts with a non-zero velocity.

To prevent that, you can force the velocity to zero:

 // switch to 'kinematic'
 rigidbody.isKinematic = true;
 rigidbody.useGravity = false;
 rigidbody.velocity = Vector3.zero;
 rigidbody.angularVelocity = Vector3.zero;

 // switch to 'non-kinematic'
 rigidbody.isKinematic = false;
 rigidbody.useGravity = true;
 rigidbody.velocity = Vector3.zero; // or another initial value

 

Now you should tell us more about how you switch from kinematic to non-kinematic, and what exactly happens.

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

Answer by Montraydavis · Oct 26, 2012 at 01:09 AM

Kinetic is based off of energy, versus gravity;

http://en.wikipedia.org/wiki/Kinetic_energy

Comment
Add comment · Show 2 · 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 Kryptos · Oct 26, 2012 at 08:09 AM 0
Share

Your answer is just off-topic.

avatar image Zarenityx · Aug 12, 2014 at 07:30 PM 0
Share

umm... what? $$anonymous$$inematic. Not $$anonymous$$inetic.

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

11 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

Related Questions

How to deal with *many* moving colliders? 1 Answer

My objects keep falling through 1 Answer

Problems with ragdolls and no gravity 0 Answers

Help with orbits 1 Answer

Falling object, change its angle 0 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