Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Unreal Engine 4.X By Example

You're reading from   Unreal Engine 4.X By Example An example-based practical guide to get you up and running with Unreal Engine 4.X

Arrow left icon
Product type Paperback
Published in Jul 2016
Publisher Packt
ISBN-13 9781785885532
Length 506 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
 Carnall Carnall
Author Profile Icon Carnall
Carnall
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Unreal Engine 4.X By Example
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Introduction to Unreal Engine 4 2. Blueprints and Barrels – Your First Game FREE CHAPTER 3. Advanced Blueprint, Animation, and Sound 4. Unreal Engine, C++, and You 5. Upgrade Activated – Making Bounty Dash with C++ 6. Power Ups for Your Character, Power Ups for the User 7. Boss Mode Activated – Unreal Robots 8. Advanced AI and Unreal Rendering 9. Creating a Networked Shooter 10. Goodbyes and Thank yous Index

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 colliding with a rock obstacle! This is very easily done. Navigate to the BountyDashCharacter.cpp in code; we are going to be defining the collision function.

ABountyDashCharacter Collision functions

The first collision function we will be defining...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images