Missile Projectile
In this tutorial, we'll guide you through creating a Missile Projectile employing Mnh Shape Component tracers. The missile will advance forward until it encounters an obstacle, triggering an explosion
Last updated
In this tutorial, we'll guide you through creating a Missile Projectile employing Mnh Shape Component tracers. The missile will advance forward until it encounters an obstacle, triggering an explosion
Last updated
Start by generating a new Actor named "BP_Missile." Set up an Arrow component as the Root of the actor and attach a Cone component to it. This establishes the basic structure of the missile actor.
In the Tick function of the "BP_Missile" Actor, implement logic to make the missile move towards the positive x-direction. Update the actor's location accordingly during each tick to achieve the desired forward movement.
Extend the functionality of the "BP_Missile" Actor by adding both the Mnh Tracer and Mnh Capsule components. Attach the Mnh Capsule to the previously added Cone component, ensure the Hitbox is configured appropriately for accurate hit detection.
Setup Tracer parameters as follows.
Tracer Tag → Missile
Trace Source → Mnh Shape Component
Draw Debug Type → For One Frame
In the Begin Play event, initialize the tracer by calling the "Initialize Tracers" node. Supply the Mnh Capsule component as the source and set "Missile" as the Tracer Tag.
After initializing the tracers with "Initialize Tracers," proceed to call the "Start All Tracers" node. Additionally, set up the "On Hit" event to spawn the Niagara system and destroy the actor upon a successful hit.
With the provided setup, your missile should now move forward until it encounters an object. Upon contact, it will trigger the Mnh Tracer's hit detection, leading to the execution of the "On Hit" event. This event, as configured in the previous steps, will spawn the explosion effect using the Niagara system at the impact point and then destroy the missile actor.
For fun: Increase the missile speed to 5 million and observe as Miss No Hit accurately registers hits even at extreme conditions!