[UE5 Mass] How to set/override exact initial spawn rotation for static entities? (Ignoring EQS rotation)

Hi everyone,

I’ve been working with Mass Framework (MetaHuman Crowd) and I’m stuck on a seemingly basic issue. I simply want to spawn two static entities facing each other for a dialogue scene, but I cannot get them to spawn with a specific rotation.

The Problem: No matter how I set up the spawn points, the Mass Entities always default to facing the X-axis (Rotation 0,0,0) upon spawning.

What I have tried so far:

  1. EQS SpawnPoints Generator: I used an EQS query (ActorsOfClass) to find specific BP_SpawnDot actors that I placed in the level. I manually rotated these actors to face each other. The EQS finds their locations perfectly, but Mass completely strips the rotation data and spawns the entities facing the default X-axis.

  2. Disabling Movement Traits: I thought the avoidance or steering systems were resetting the rotation, so I removed all Movement/Steering traits from the Mass Entity Config, leaving only the Animation Trait. They still spawn facing X.

  3. State Tree & Smart Objects: I tried the workaround of spawning them nearby and using a Mass State Tree to Find Smart Object TargetClaim SmartObjectMass Use SmartObject Task so they would snap to the slot’s rotation. However, this is incredibly convoluted for a simple static cinematic spawn, and I run into constant issues with claiming slots.

My Question: Is there a straightforward way to pass rotation data to Mass Entities during the spawn phase? Do I need to write a custom C++ UMassSpawnDataGenerator to achieve this, or is there a way to force the entities to inherit the rotation of the EQS points/querier without setting up a massive StateTree logic?

Excellent question!

Looking through the spawner code, it seems we did not need it when making The Matrix Awakens so it got a bit overlooked. I think the primary way to accomplish this is creating a custom spawn data generator. The engine supplied versions in MassGameplay use SetLocation but not SetRotation. You could copy the logic for the EQS generator and add a line for setting your rotations to either the actors found or other logic.

Another option is to look at how the parked vehicle spawn data is done in CitySample using data assets which have the transform with rotation included. I don’t remember if it is discussed how that is done anywhere online, but I believe the code and data assets should be enough to reconstruct what was done.

A third option is to create an observer processor that looks for a given tag to capture the entities and set their rotation in their transform fragment once the creation context is destroyed for the entities that were spawned. I believe the MassVelocityRandomizerProcessor uses a pattern similar to this.

And you are correct in that some processors for movement can stomp rotation such as SmoothOrientationProcessor. You would want to remove/exclude those from your configs to ensure rotations did not get overridden or had ordering issues with the option you choose.

-James