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 Patyrn · Mar 05, 2011 at 09:19 PM · physicsrigidbodykinematic

Switch off Kinematic for a Rigidbody in response to an explosion or impact?

Is there any event which fires prior to physics forces being applied so I can check their magnitude, and turn off isKinematic if I want my vehicle to get tumbled about?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Jason B · Mar 05, 2011 at 10:45 PM

As far as I know there is no such event that fires prior to a collision. I believe a collision has to actually occur before the data about it can become available. However, there is still a way to take advantage of the collision that occurs to your car while it's kinematic, and base a new physics force off of it.

Just off the top of my head, you might try testing the magnitude of the blast that hit the car's hit box, sending a signal to your car saying it just got hit (if the magnitude came back as "significant") and the magnitude of it, then turning off isKinematic and creating a new omnidirectional explosive force placed at the location of impact with the same magnitude of the one that just hit it.

Should work fine, even if it does sound a little hacky.

Comment
Add comment · Show 3 · 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 Patyrn · Mar 05, 2011 at 11:40 PM 0
Share

This seems like it would work for projectiles, but I don't see any way for a kinematic rigidbody to know it got hit with explosive force.

avatar image Jason B · Mar 06, 2011 at 03:13 AM 0
Share

$$anonymous$$inematic rigidbodies still receive physics collisions so long as there is a collider component attached, the fact that they're kinematic just means that there will be no physical reaction (but the data of the collision should still be available).

avatar image Patyrn · Mar 06, 2011 at 09:20 AM 0
Share

But do explosions even trigger any events? They aren't collisions.

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

No one has followed this question yet.

Related Questions

Projectile collides, freezes, but flips to weird angle. Help! 0 Answers

Realistic collisions with a kinematic rigidbody? 1 Answer

Moving and SweepTesting a kinematic Rigidbody multiple times within a single FixedUpdate() call 0 Answers

Preventing objects from intersecting with minimal physics 3 Answers

Disable rigidbody from being able to move other rigidbodies 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