|
Is there a limit to the collision detection that can happen between two objects? I have a cube and a ball in a game im working on, controller would be the cube as you move it around and direct the balls trajectory. For some reason when i move the cube too fast it ejects from the cube then goes on its merry way. Ive tried using the new dynamic colliders in unity 3 as well as tried a raycast to stop the ball from leaving the cube. Any insight/input would be appreciated.
(comments are locked)
|
|
The only limit to the collision detection would be hardware, since colliders may hit very hard on performance. Specially mesh colliders. And raycasting actually is your best bet. Your question should rely mainly on the "too fast", and there are many many questions on that already. Here's my favourite. In short, just use DontGoThroughThings. For more details, I'll quote myself from there:
For un unknown reason, DontGoThroughThings fails when deploying my app to iOS...
Oct 17 '12 at 01:49 PM
attiksystem
@attiksystem I've used it in iOS and I tend to doubt it's an issue with the script. Can you give more details?
Oct 17 '12 at 02:10 PM
Cawas
Hi, sure. When attaching DontGoThroughThings to my object (Cloth Renderer, I'm not sure this has an effect), and deploying to iOS, it bombs at line 0x81a0, with error "Thread 1: EXC_BAD_ACCESS (code=1, address = 0x0)". Using Pro version of the tools, latest version of everything.
Oct 17 '12 at 02:18 PM
attiksystem
@attiksystem no render should present any effect on this. the "line" the assembly code doesn't help as I'm not fluent in it. also EXC_BAD_ACCESS tells me nothing without knowing what was in the original (rather than assembly) line that triggered it - since I don't have a "knowledge base" of the script possible errors... I advice you to create an empty scene, free of errors, and little by little build and test something that can emulate what you need. Then attach the script. If, by any chance, you find any errors there, you'll have a much better idea what could have caused it.
Oct 18 '12 at 11:30 AM
Cawas
Thanks. I'll try that. But meanwhile, I found another trick in order to avoid objects to "go through" other objects: make one of them very thick. This might not work all the time, but for my particular application, it does!
Oct 18 '12 at 11:43 AM
attiksystem
(comments are locked)
|

Really? not one person? =( Thanks anyways.
Please specify again how your scene is setup. It's not clear how the cube and the sphere are connected and how you make use of the physics engine.
similar: http://answers.unity3d.com/questions/22351/colliding-fast-moving-objects-position-in-last-fra.html