---
title: "Module 4 Challenge"
content_type: tutorial
url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity/unit/module-4-projectile-setup/tutorial/module-4-challenge-3?language=en"
language: en
container_type: course
container_title: "Programming Interactions with C# Scripting in Unity"
container_url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity.md?language=en&version=6.0"
unit_title: "Module 4:  Projectile Setup"
unit_url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity/unit/module-4-projectile-setup?language=en&version=6.0"
standalone_markdown_url: "https://learn.unity.com/tutorial/module-4-challenge-3.md?language=en&version=6.0"
previous_title: "Module 4 Assessment"
previous_url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity/unit/module-4-projectile-setup/quiz/module-4-assessment-3?language=en&version=6.0"
previous_markdown_url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity/unit/module-4-projectile-setup/quiz/module-4-assessment-3.md?language=en&version=6.0"
next_title: "Module 5 Videos"
next_url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity/unit/module-5-ui/tutorial/module-5-videos-2?language=en&version=6.0"
next_markdown_url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity/unit/module-5-ui/tutorial/module-5-videos-2.md?language=en&version=6.0"
difficulty: intermediate
duration_minutes: 15
unity_version:
  - "6.0"
supported_unity_versions:
  - name: "6.0"
    url: "https://learn.unity.com/course/programming-interactions-with-c-scripting-in-unity/unit/module-4-projectile-setup/tutorial/module-4-challenge-3.md?language=en&version=6.0"
last_updated: "2026-08-04T14:24:05.000Z"
---

# Module 4 Challenge

Learn to build projectile prefabs, fire them, handle collisions and expiration, and add tagged explosion effects with particle systems.

This module focuses on creating and managing projectiles in Unity. Learners will build a projectile prefab, implement firing mechanics, and configure interactions such as collisions and explosions. The module also introduces using tags and particle systems for dynamic effects.

By the end of this module, learners will be able to:

- Create and configure a projectile prefab with essential components.
- Implement mechanics for firing projectiles.
- Set up interactions for projectiles, including collisions and expiration.
- Use particle systems to create explosion effects.
- Utilize tags to identify and interact with specific objects.

## 1. Challenge

**Challenge**

Estimated Time:  15 minutes

In this challenge, experiment with the Rigidbody component and Force properties.

**Challenge Steps**

1. Experiment with the ExplosiveShot prefab’s Rigidbody component; how does changing the mass, drag, and angular drag values affect the feel of the shot?
2. Experiment with the cannon’s projectile force property. How does it affect the projectile’s firing properties relative to the gravity and drag properties of the projectile’s Rigidbody?

## 2. Bonus Challenge

**Bonus Challenge**

1. The project does not account for the fact that a cannon barrel is smooth, which causes cannonballs to have a random spin when fired. Add the following line of code to the cannon’s fire method before applying force to the projectile:

```csharp
rb.AddTorque(Random.insideUnitSphere.normalized * projectileForce, ForceMode.Impulse);
```

Add a new public float variable to the class called projectileTorque and update the AddTorque to use it.
