Game Development Reference
In-Depth Information
10. Select the
PLBullet
prefab and drag it into the empty slot on the script com-
ponent of the
Inspector
panel.
11. Now that the
Rigidbody
component has been added to the
PLBullet
prefab,
we need to edit a couple properties in the
Inspector
panel. Uncheck the
Use
Gravity
option and check the
Is Kinematic
option. This way the bullet won't
be affected by gravity and it will trigger collisions with other game objects. If
you want to know more about
Rigidbody
and
Collision Detection
, we sug-
gest you to refer to the Unity manual.
12. Check the following screenshot to see you did things right: