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
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unreal Engine Physics Essentials

You're reading from   Unreal Engine Physics Essentials Gain practical knowledge of mathematical and physics concepts in order to design and develop an awesome game world using Unreal Engine 4

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher
ISBN-13 9781784394905
Length 216 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Devin Sherry Devin Sherry
Author Profile Icon Devin Sherry
Devin Sherry
Katax Emperore Katax Emperore
Author Profile Icon Katax Emperore
Katax Emperore
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Math and Physics Primer FREE CHAPTER 2. Physics Asset Tool 3. Collision 4. Constraints 5. Physics Damping, Friction, and Physics Bodies 6. Materials 7. Creating a Vehicle Blueprint 8. Advanced Topics Index

Forces and energy

One of the most important concepts regarding energy is that it's a property of objects that can be transferred from one object to another, but it cannot be created or destroyed. All forms of energy follow the conservation of energy aspect and can be converted to different types of energy. There are many types of energy that exist in the real world. Here are a few examples:

  • Kinetic Energy: This specifies the motion of a moving body
  • Potential Energy: This denotes the energy that an object has due to its location in the 3D space
  • Mechanical Energy: This specifies the sum of kinetic and potential energies
  • Heat: This denotes the amount of thermal energy being transferred in the direction of decreasing temperature

These are just a few examples of energy that exist in the real world, so feel free to perform additional research on the concept of energy because this section will only cover the surface of the topic. When it comes to the concept of energy and the conservation of energy, Unreal Engine 4 follows these properties as well through its built-in physics engine.

As discussed in the previous section of this chapter regarding the Newtonian principles, forces are any interaction that tends to change the motion of an object. This can also be referred to as concepts (such as pushing and pulling) and contains a magnitude and direction, making it a vector quantity. Forces can be caused by gravity, magnetism, wind, or even the pushing or pulling of an object by a person or machine.

Forces and energy

In Unreal Engine 4, we can add forces through blueprint scripting, and we can perform this in a few ways. The first method is a function called Add Force. This acts a lot like a thruster and adds a linear burst of energy in the specified direction.

Forces and energy

You can add this type of force to any component associated with our blueprint, or you can apply this force to any component that is hit by a component of our blueprint. We can also see that there is a bone name property in this function. This means that we can apply force to a bone if one exists in our blueprint.

The second method of applying forces to our blueprint components or to components in our game world is through the Add Radial Force function:

Forces and energy

This function allows you to specify a location in the 3D space. Here, the source of the radial force begins and then specifies a radius and strength using Float values. Lastly, we can apply one of the two methods of Falloff for the radius, which is either a constant fall-off or a linear fall-off. All bodies in this radius will be affected by this force, so make sure that you take this into consideration when you apply radius and strength values.

You have been reading a chapter from
Unreal Engine Physics Essentials
Published in: Sep 2015
Publisher:
ISBN-13: 9781784394905
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 $19.99/month. Cancel anytime
Banner background image