Tag: Actor
-
Unreal Engine: Fixing the ‘Pin Context Object must have a connection’ Issue
I wanted to empower my sound designer to create simple blueprints that respond to Game Events. To achieve this, I created a custom class inheriting from a UObject to encapsulate the blueprint script. However, in this object blueprint, when attempting to access a Service (or any static method with a hidden World Context Object pin),…
-
How to Attach an Actor to Another Actor Using a Socket in Unreal Engine
It’s worth noting that the ‘Attach Actor to Actor’ node might not behave as expected when trying to attach to a socket on a skeletal mesh. This can be a bit misleading because this node attempts to attach to a socket on the Root Component. However, in the case of a character, the root component…
-
How to calculate an Actor Oriented Bounding Box (OBB) With Unreal Engine
To obtain an Oriented Bounding Box (OBB) for an object, we first need to retrieve the local Axis Aligned Bounding Box (AABB) and then construct our OBB using a center and an extent vector transformed with the Actor’s world Transform. While the AABB consists of a single Extent vector representing the magnitude on each axis…
-
How to Spawn an AI Controller Pawn in Unreal Engine
Use “Spawn AI From Class” to Spawn an AI Character If you want to spawn a Non-Player Character (NPC), you should use the “Spawn AI From Class” node in Unreal Engine, rather than “Spawn Actor for Class”. This is because an AI character is actually composed of two actors: the pawn and the controller (which…
-
Deactivate an Actor Component (and why it may not work for you)
When working with Unreal Engine 5.1, you may need to disable an Actor component at some point in the game. The most straightforward way to do this is by calling the Deactivate() function on the component. However, you may notice that even though you have called this method, the component still seems to be activated…
-
About the importance of Components in Unreal
Components are one of the key features of the Unreal Engine, providing a modular and flexible way to add functionality to actors (and characters). By encapsulating specific functionality into components, code can be organized and managed in a more efficient way. In this article, we will explore the advantages of using components and how to…