Home > other > Please ignore the rays and role controller collision detection method
Please ignore the rays and role controller collision detection method
Time:09-30
I novice small white, recently to do a first person shooter game, the launch of the bullet, fired from among the camera a ray collision detection objects, and then instantiate the bullet from the muzzle toward the rays and the collision of some object, (wall) To the role of a controller, because of the collision body features, ray from the camera, the first is the collision to the role of controller, lead to the bullet flew into his face, very headache, please ignore the ray collision detection method, and the role controller
CodePudding user response:
There will be this kind of situation? Ray detection not to set up the layer?
In the bullet in the script to add public LayerMask mask;