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 unity_Yix4cg1p_JpgwQ · Aug 14, 2018 at 12:02 PM · rigidbodyspeed

my rigidBody.velocity return values that are false

Hello everybody I have a rigidBody witch is attached to my Mouse movements, but when I try to read the speed of my rigidBody with .velocity, Unity gives me values that are stupids. ( I precise that my rigidBody have a good movement on my screen). To verify if I was doing something wrong I tried to calculate myself the speed of my object. And this speed is realistic and different then the result of rigidBody.velocity. Someone have ever seen this kind of behaviour? If yes, where is the possible cause of the problem because I try to understand this since 2 days. other question, someone knows How Unity calculates the rigidBody speed? I searched on Google but I found nothing...

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 MT369MT · Aug 14, 2018 at 01:06 PM 0
Share

Can you post the values that you obtain and that you calculated? Remember that Rigidbody.velocity give you a Vector3 and not a float value. So it gives you a velocity for each axis. To know the real velocity use Rigidbody.velocity.magnitude.

avatar image unity_Yix4cg1p_JpgwQ · Aug 14, 2018 at 02:53 PM 0
Share

@$$anonymous$$T369$$anonymous$$T I watch each part of the vector3, I don't need the magnitude of the vector. typically the vallues that I obtain are: speed rigidBody Unity = [-7.637933E-06, -4.117611E-07, 3.779806E-05] speed rigidBody calculated = [6.325331, 51.18787, 0.000115009]

speed rigidBody Unity = [-2.391932E-06, -4.11761E-07, 3.996145E-06] speed rigidBody calculated = [-16.97925, -55.43628, -5.547373E-05]

speed rigidBody Unity = [57.57919, -0.0005282579, 91.50948] speed rigidBody calculated = [2.325537, 43.95508, 0.0001245212]

I checked if that was due to zoom and it's not.

avatar image unity_Yix4cg1p_JpgwQ unity_Yix4cg1p_JpgwQ · Aug 14, 2018 at 02:36 PM 0
Share

I am sorry my previous comment detroyed the layout that I did... So the first value is calculated with .velocity and the other with : (pos_0-pos_1)/Time.DeltaTime the values are organized like this : speed = [x, y, z]

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by unity_Yix4cg1p_JpgwQ · Aug 21, 2018 at 02:47 PM

I finally found the solution... I had a rigidBody attached to my father and a rigidBody attached to his son... I found the solution when I saw on a topic that is was not recommended to do this kind of thing...

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

179 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 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 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

How to increase and decrease speed gradually? 1 Answer

Speed pad/booster 3D 1 Answer

Space Shooter Bolt Speed Forward Issue 2 Answers

Getting the rigibody horizontal and vertical speed before added to their position? 0 Answers

Getting two Objects to the same direction with different speed 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