Friday, 5 May 2017

Interactive Menu Toy

For my interactive menu toy, I didn't want to go too mad with weirdness, so I created a line-trace interaction that finds objects which it hit and applys a radial force to them, to make them move around with physics.

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