How To Tutorial : Unreal Engine 5 Physics Handles in depth

Thejollygrimreaper

Thejollygrimreaper

22 min, 4 sec

The video demonstrates how to create an object grab mechanism using a physics handle in Unreal Engine specifically for objects that simulate physics.

Summary

  • The tutorial begins with a demonstration of arranging objects on the screen.
  • The instructor explains the process of grabbing objects with a physics handle, emphasizing that it only works with objects simulating physics.
  • A step-by-step guide is provided for setting up a line trace, handling object interactions, and differentiating between static mesh actors and physics-simulating objects.
  • The video covers how to grab and move both static mesh actors and physics-simulating objects using the left mouse button in a first-person character template.
  • Additional tips are provided for smoothing out the object grabbing process, avoiding sudden jumps when grabbing from a distance, and handling object rotation.

Chapter 1

Introduction to Object Grabbing

0:03 - 37 sec

Introduction to the concept of object grabbing using a physics handle in Unreal Engine.

Introduction to the concept of object grabbing using a physics handle in Unreal Engine.

  • The instructor mentions that they will show how to grab objects using a physics handle.
  • They note that the physics handle works well but only with objects simulating physics.

Chapter 2

Examples of Non-Physics Objects

0:39 - 30 sec

The instructor provides examples of non-physics objects and the challenge they present.

The instructor provides examples of non-physics objects and the challenge they present.

  • Objects like a knife in a drawer or a ball on the ground are typically static until interacted with.
  • The instructor notes the difficulty in applying physics handle to objects that don't simulate physics.

Chapter 3

Setting Up the First Person Template

1:09 - 52 sec

Instructions on setting up the first-person character template and initiating a line trace.

Instructions on setting up the first-person character template and initiating a line trace.

  • The first-person character template is loaded, and a line trace is initiated using Line Trace by Channel.
  • Standard nodes for a line trace such as World Location and Forward Vector are set up.

Chapter 4

Handling Object Interaction

2:01 - 2 min, 4 sec

The instructor explains how to handle interactions with different objects and set variables accordingly.

The instructor explains how to handle interactions with different objects and set variables accordingly.

  • A branch node is used to promote hit objects to variables, differentiating between static and physics-simulating objects.
  • The left mouse button is set up to trigger object grabbing.

Chapter 5

Grabbing Objects with Physics Handle

4:06 - 1 min, 46 sec

Details on grabbing objects that are simulating physics using a physics handle component.

Details on grabbing objects that are simulating physics using a physics handle component.

  • The Physics Handle component 'Grab Component at Location' is used to grab physics-simulating objects.
  • The instructor explains how to correctly give the component a grab location.

Chapter 6

Handling Static Mesh Actors

5:52 - 2 min, 29 sec

Guidance on moving static mesh actors that are not simulating physics.

Guidance on moving static mesh actors that are not simulating physics.

  • An actor reference is created to handle static mesh actors without physics.
  • A boolean variable is set to indicate when an object is being grabbed.
  • The end location of a line trace is used to set the new location of the static mesh actor.

Chapter 7

Releasing Grabbed Objects

8:21 - 4 min, 6 sec

The process of releasing both physics-simulating and static mesh actors using the mouse button.

The process of releasing both physics-simulating and static mesh actors using the mouse button.

  • The instructor shows how to release the grabbed objects and clear the respective variables.
  • Both types of objects are handled, and the functionality is demonstrated with a cube and a gun in the scene.

Chapter 8

Adjusting Grab Distance

12:27 - 7 min, 48 sec

The tutorial covers adjusting the grab distance to prevent objects from jumping when grabbed from afar.

The tutorial covers adjusting the grab distance to prevent objects from jumping when grabbed from afar.

  • A new float variable 'Grab Distance' is created to store the distance from the player to the object when it is grabbed.
  • The grab distance is used to maintain a consistent distance when moving the object.

Chapter 9

Conclusion and Final Adjustments

20:15 - 1 min, 42 sec

Final adjustments and a summary of the object grab mechanism with static and physics-simulating actors.

Final adjustments and a summary of the object grab mechanism with static and physics-simulating actors.

  • The instructor concludes by showing the smooth operation of the object grab mechanism.
  • Final adjustments are made to improve the experience, such as handling rotation and collision.