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
1
Question by amphoterik · Apr 18, 2012 at 07:27 PM · collisionphysicsmath

Accurate Collision Detection and Impact Physics Calculations

Hello everyone, I am making a boxing game using Unity 3D and the Kinect. Currently I am using rigidbodies, triggers, and a little math to handle collisions and force. I am using Unity's built in collision detection for my sphere collider (hands) and a box collider for my target (enemies). Every update tick, I am recording the current position and time. Then, whenever a collision is triggered, I am using the new position, old position, and elapsed time to determine the velocity. I am then using the velocity and mass to calculate my force and am applying as an impulse force to my target. Here are my two issues:

1) How do I improve the accuracy of my collision detection? Sometimes my hand travels through my enemy. I am using the Kinect, so my hands can move pretty fast. Not much else is going on in this game, so there isn't much processing needed in other parts.

2) How can I improve the quality of my impact physics? Currently my mass is an arbitrary "1", and the scale of my arms (in game distance) is unknown. Is there a better way to calculate impact force?

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
2
Best Answer

Answer by TheDarkVoid · Apr 18, 2012 at 08:29 PM

You can edit how accurate collision detection is the Edit>Project Settings>Physics Menu. That should be all you need to tweak, increasing the the accuracy too much will cause lag.

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 amphoterik · Apr 19, 2012 at 12:13 AM 0
Share

Thank you, I am looking in there. Which settings need to be tweaked to increase Collision Detection?

avatar image syclamoth · Apr 19, 2012 at 12:14 AM 0
Share

Unfortunately, I think your problems are a little more serious than that. The reason the collisions aren't working properly is because in one frame, your hand is entirely on one side of an object, and in the next frame it is entirely on the other! You will need to implement some kind of raycasting collider to solve this problem.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

2.5D Platformer where character moves between points has issues where physics take player off of the line between points. 0 Answers

How to calculate magnitude when resolving collision events? 1 Answer

Collision impact force 1 Answer

Rigidbodies won't collide if mass difference is too high 0 Answers

Detailed terrain mesh collision 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