Creating the interactions between the world objects

Finally, we have created the game world for BountyDash! Now, it is time to make it all interact with one another. We have already done this somewhat by having the coin adjust height when it is spawned on top of an obstacle object. We must scrutinize how we are going to interact with the player when it runs into the objects around him. First, let's detail how the player is going to be colliding with the obstacles.

Pushing the Character

When the player runs into a rock, we want the player avatar to be pushed back into the game world down the x-axis. This will be quite simple to implement; we can introduce the same offset backwards to the player that we do for all the other objects if he is currently ...

Get Unreal Engine 4.X By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.