Moving multiples of the same actor in different directions

Hi, I’m making a simple 2d space invaders-esque game for an assignment I’m working on. I have a ‘Boss Ship’ which deploys a bomb, after a time, the bomb stops and explodes sending up to 12 shrapnel actors in different (equal angles) directions

My problem is, I’m unsure how to affect the movement of one shrapnel actor without it having the same effect on all the other spawned actors. I tried using Instanced Static Meshes until I discovered that these can not be moved after run time. I had the logic working, but the Update Instance Transform would not work.

Any help would be appreciated, thanks!

You could use projectiles to that.

Create a new Blueprint class called BP_BombShrapnel:

  • Add a Projectile Movement component

  • Add a Sphere Collision, and make it the root.

  • Add a static mesh, set it to be the mesh of your shrapnel. Make sure it is pointing forward on the X-Axis.

  • Set your projectile movement component with these settings, or whatever you need:

You may also want to set Projectile Gravity Scale to 0.

Then in your Bomb blueprint class, do the following:

Since you are in 2D, you might need to adjust what axis that is rotating on, but the idea will be the same.

At the moment your projectiles won’t collide with anything, but if you set the collision sphere to BlockAll, they will collide with eachother since they are spawned in the same location. So one way to fix that would be to add a new collision channel in your project. In project settigns, go to collision, and add a new Object Channel, call it Projectile.
Then go back to your BP_BombShrapnel, click the sphere collision and set it like this:

130454-collision.png

How it looks: http://imgur.com/a/spv6m
You could reduce the velocity and speeds to get a slower shrapnel too obviosuly