Hi,
I am building a custom projectile pool with hierarchical instanced static meshes. For each projectile, I want to be able to set custom material data. For testing, I just assign three random floats to the RGB channels of an emissive color for my projectiles.
So, I set everything up and when I hit play and tested, all projectiles I shot were rendered black. It took me a while to find out that my setup was actually correct because, when I paused the game, I saw that the projectiles actually had a random color. I made a little showcase video here:
I tried to switch from HierarchicalInstancedStaticMeshComponent to InstancedStaticMeshComponent but that didn’t change anything.
I also noticed that, the less projectiles I shoot, the less rendering issues I have but they never go away completely.
Removing this line in my projectile movement logic makes the projectiles render correctly:
HISMProjectiles->UpdateInstanceTransform(ProjectileIndex, NewProjectileTransform, true, true);
However, obviously that doesn’t help since they then stop moving.
Any ideas how I can make this work?
Thanks!
Nico