Developer Notes

The user should be calling SetStaticMesh() instead of setting the property directly.

Description

Spawning a StaticMeshActor at runtime results in the StaticMeshActor not being visible until a property has been changed, such as the material for the Static Mesh. The spawned actor will also have no collision unless it is set from Static to Moveable.

Steps to Reproduce

1. Download the attached project
2. Right-click the .uproject file, generate Visual Studio project files, compile the project, open the .uproject file.
3. Open the untitled map and press play
Result: Nothing appears but a StaticMeshActor is spawned, which can be found in the World Outliner.
Expected: A StaticMeshActor using the 400x400 floor static mesh should appear

To see problems with collision
1. Uncomment line #23 in MyActor.cpp and recompile (This will make the StaticMeshActor appear when it spawns)
2. Press play in the editor and attempt to collide with the newly spawned actor
Result: Collision does not occur
Expected: You should collide with the actor

To make the collision work, uncomment line #26 in MyActor.cpp and recompile.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

By Design
ComponentUE - Gameplay
Affects Versions4.104.114.12
Target Fix4.11
CreatedDec 22, 2015
ResolvedJan 4, 2016
UpdatedApr 27, 2018
View Jira Issue