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 /
This question was closed Jan 30, 2018 at 02:00 PM by Romano for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Romano · Jan 25, 2018 at 10:56 PM · rigidbody2dvelocity

Rigidbody2d has zero velocity after simulated set to true

Hello there. I'm making something where you can drag around a UI object that has a rigibody2d attached. I'm setting simulated to false to turn off collisions with other objects while it's being dragged around. On dropping the object I am setting rigidbody.simulated to true. I want it to play a sound based on the rigidbody's velocity when it lands, but when it does, the velocity is zero. If it bounces off of another rigidbody before hitting the ground that corrects the problem. Am I using this incorrectly? Thanks!

Comment
Add comment · Show 3
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 KittenSnipes · Jan 26, 2018 at 10:12 AM 0
Share

@Romano

I think you are using it correctly. $$anonymous$$ight need the script to tell more. I dont need the entire script just where the problem happens

avatar image Legend_Bacon · Jan 26, 2018 at 11:45 AM 0
Share

If the only thing you want to do is disable collisions, wouldn't it be easier to just disable the collider when you start dragging the object? That way you should still have get the proper velocity from the Rigidbody.

Hope that helps!

Cheers,

~LegendBacon

avatar image Romano Legend_Bacon · Jan 30, 2018 at 01:58 PM 0
Share

Thanks for the suggestion. Disabling the collider and setting simulated to false seems to yield the same results in this case. I suppose there are pros and cons to both depending on how the object is used in the end though.

1 Reply

  • Sort: 
avatar image
0

Answer by Romano · Jan 30, 2018 at 01:56 PM

Silly me, the velocity is of course 0 after it lands, because it's stopped. To use this method I'd have to get the velocity just before it collides I suppose.

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

Follow this Question

Answers Answers and Comments

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

Related Questions

Keeping momentum with rigid bodies. 0 Answers

Rigidbody2D with interpolation lags while moving by velocity, how to solve the problem? 1 Answer

Issue with direction and rigibody2D 1 Answer

Displaying the y value score,Displaying the score of the Y value 1 Answer

Make object stay inside circle 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