|
OK, right know I want to create a dropshield like halo reach game. As you know the dropshield not permit the pass of bullets, grenades, rockets, etc., but the player can get in or get out of the dropshield, that means that it has a collider that permit only the pass of a player. I know it could be a simple solution if you make it trigger and when the bullet collides(OnTriggerEnter)the bullet is destroy, but I actually want to make it bounce and also with grenades wont work. So I want a know if there is a code that permit this or a tactic to make the dropshield. Basically I want to make something like this:
(comments are locked)
|
|
Set your shield and player to different layers, then use the Layer Collision Matrix in Edit > Project Settings > Physics to alter what collides with other things. wow thanks a lot it really works and no script need :)
Jul 02 '11 at 03:46 PM
Uriel_96
ouhh, only one thing, I used a sphere to do the dropshield(with a sphere collider) and all is fine, but when you are inside the dropshield and you shoot the bullets goes really weird. Maybe I know why but don't know how to solve it.
Jul 02 '11 at 03:52 PM
Uriel_96
Neat! You could set the bullets to a different layer when you are inside or outside of the shield.
Jul 02 '11 at 04:12 PM
save
(comments are locked)
|
