I started by creating the objects which would be used. I made a blueprint that contains a static mesh component and a contruction script which tells the object to spawn as either a crate or a barrel using an array of objects and a random index.

I then created a blueprint which is similar to my enemy spawning objects, which spwns a number of objects in a radius around the object centre point.
I placed this in my player select screen, so this means that each time the game is started, there are a different set of objects in different positions for the player to interact with.
The Interaction
The actual interaction is on the dummy character spawned when the game starts.I created a gate node that opens whenever the input button is pressed. This creates a line trace from the mouse pointer screen position into the screen. When an object is hit it creates a radial input at the object position, which causes it to react.

And the result is flying crates and barrels.

No comments:
Post a Comment