Hi everybody.
I’am very new to unity.(and not very good )
I tried to write a script for shooting bullets.
I’m shooting with objects (box collider and ridgidbody)
But sometimes they go right through the other object.
i know that a meshcollider can not collide with another meshcollider (so i don’t use them)
sorry about my english, i know that it is not the best, because im from Germany.
I uploaded the scene but i don’t know if you have all the sctipts and assets i used.
I hope you can help me thank you for that
m.k.
have you set one of the as a trigger???
no…no trigger.
But what means trigger?
I’ve seen it in the inspector…but i don’t know what its good for. . .
thank you for the fast reply.
m.k.
yeah, the one in the inspector. try it, tell me what happens when you do.
now it always goes through the cubes.
Sorry
m.k.
um…
are you taking a tutorial? because they should go over the problem?
read through this and see if it helps.
thank you.
is it possible that the small “bullets” are to fast?
I apply the force 100.
ps.
Thank you for your fast answers.
play around with the speed. I cannot promise anything.
If they are too fast, then some simple editing in your script would work fine.
Hi
I have got another idea.
Would it make sense to use Raycast
and add something from the Detonater extension
where the raycast hit a collider for the physics
Hope you understand me ?!
m.k.
I would write down all possible ways of doing it, and then think logically about which is better.
Is there another way beside using racasting or shooting
real rigidbodys ?
I think I will try racasting now.
Big thank you for your time !
No problem!
Always happy to help.
If you join my forum (link in sig) I will be able to help you more often with your problems!
I will join your forum soon !!!
ok, thanks in advance!
and PM me with any more problems!
OK
thank you
no problem!
in physX if the speed is too fast,it will go through objects,so physx support a Continuous collision detection (CCD) to solve this.I think you can just make your bullet’s BoxCollider longer in the direction of the force,but use the small mesh and make the mesh at the head of the collider,then it will not go through walls again. like this:
long collider small mesh
-------------------+