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 mory · Apr 30, 2012 at 11:53 AM · collidercollision detectionrigid body

contuouse collision detection malfunction

hi . i need help with an old problem of mine .

1-make a wall.

2-make a bullet with box collider with fast speed that move towards wall.

3-bullet will pass from wall usually.somtime hit the wall, somtimes ignore wall , in more speed it always ignore wall!!!!!

this pic

i checked and changed all of this :

1-physics options.

2-collider rigid body options .

3-collison detections(discrete, continuous collision ,continuous dynamic).

no change :(

i know that this issue most solve with continuous collision detection ,but not worked for me .

ccd.png (230.5 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by fafase · Apr 30, 2012 at 12:05 PM

alt textSimple problem. At fast speed, let's say you have 500m/s with 50fps we have 10m/f

at t=0 pos.x =0

at t=1 pos.x = 10

at t=2 pos.x = 20 and so on

The movement is discrete. In between the bullet does not go. So if you are behind a wall and someone is shooting at you, this way the bullet does not collide with the wall but right before and after. So yuo get killed and it is wrong-

Use raycast instead or try to set your rigibody collision to continuous or continuous dynamic.


ScreenHunter_60 Apr. 30 15.12.png (80.6 kB)
Comment
Add comment · Show 1 · 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 fafase · Apr 30, 2012 at 12:15 PM 0
Share

The reason is because you are moving. So sometimes, you are exactly 10m away and sometimes you are 11m away.

avatar image
0

Answer by Kryptos · Apr 30, 2012 at 01:50 PM

Regarding bullets, the best way is to not use physics for the bullet but rather throw a raycast. If it is really high-speed, the player will not see it. So why bother creating a bullet?

If this bullet is spinning and stuff

Just add a random (but small) angle to the raycast direction.

Comment
Add comment · Show 4 · 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 mory · May 01, 2012 at 05:51 AM 0
Share

because i try to solve this fact.this gap is also in the grenade. make a sphere and throw it as a grenade, SO$$anonymous$$ETI$$anonymous$$ES it goes into the floor!

avatar image fafase · May 01, 2012 at 07:16 AM 0
Share

Could you detail how the wall and ground are made of? I mean colliders and thickness of ground and any other relevant info.

avatar image mory · May 01, 2012 at 07:41 AM 0
Share

a cube as wall. size= 9*4*0.3 . box collider .

a cube as bullet. size= .2*.2*1 . box collider . rigidbody:mass=0.05 .

a plane as ground .

avatar image fafase · May 01, 2012 at 07:59 AM 0
Share

Try to use a stretch box for the plane ins$$anonymous$$d and see if already that fixes your grenade issue. It seems like small objects and plane are a problem. http://answers.unity3d.com/questions/10145/rigidbody-sphere-falls-through-collider-plane.html. Primitive colliders are better than mesh colliders so see if there is any differences.

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Collision Detection between instances of a prefab 0 Answers

hollow cone collider has no end caps 2 Answers

How can I have collisions as a point? 1 Answer

Avoid Player bouncing when colliding with objects 3D 1 Answer

Raycast goes through collider 2 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