Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by cheadleand · Aug 04, 2015 at 06:07 PM · c#rigidbodyvelocitykinematicangularvelocity

Transferring velocity from kinematic to a rigid body

I have a rigid body which is set to kinematic (isKinematic = true). It is being kinematically moved around the environment using transform.translate and transform.rotate. However, I need to switch physics on at one point....

The problem is, when I do this, I need to apply the same velocities to the object that it was under when it was kinematic. Is there a simple way to calculate this?

I know that I can store the position at each time-step and use this to calculate the forward velocity at changeover, but I would rather avoid that as there are quite a few bodies I would need to do this for. Im also unsure how I would calculate the angular velocity...

Is there a way to capture the velocoty (and angular velocity) of an object while it is in kinematic mode?

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 kromenak · Aug 04, 2015 at 06:20 PM 0
Share

What you suggest, calculating the forward velocity and angular velocity, are the only options I'm aware of. Probably not what you want to hear, but just giving you a data point :P.

If you calculate the velocity, you should be able to use rigidbody.AddForce with Force$$anonymous$$ode set to VelocityChange.

avatar image cheadleand · Aug 04, 2015 at 06:24 PM 0
Share

How would you calculate the angular velocity though?

avatar image kromenak · Aug 04, 2015 at 06:38 PM 0
Share

Hmm, if I knew for sure, I'd provide an answer below, but here's my best shot:

For regular velocity, you just need to know the direction of movement and the speed of the object (units/second). Velocity = Displacement / Time. How are you moving the object kinematically? You might be using the velocity anyway.

For angular velocity, you'd need to deter$$anonymous$$e the speed at which the object is rotating (degrees/second or radians/second). If you're already rotating the object kinematically, I think it would be pretty straightforward to deter$$anonymous$$e the rotation speed? For example, if you are rotating by rotSpeed * Time.deltaTime in kinematic mode, then I think you can just use rotSpeed?

0 Replies

· Add your reply
  • Sort: 

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

24 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

Related Questions

Strange/Buggy code behavier 1 Answer

isKinematic object doesnt collide with wall 3 Answers

Move a rigidbody when Kinematic ?? 3 Answers

Velocity for movement 0 Answers

Pausing and Resuming a Rigidbody 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