How to apply the primary/secondary colors to the meshes?

I've replaced the pioneer's mesh (and hid the original) to be able to play custom animations, and I'm also attaching custom equipment meshes to it. Equipment uses MM_FactoryBaked like the vanilla. But the painted colors are black. How to get the colors you set in the lockers? How to apply them to the custom equipment and the pioneer's mesh? Issue about the color: https://github.com/chriscavalluzzi/SuperPioneer/issues/35
GitHub
First-person model has the wrong colors · Issue #35 · chriscavalluz...
The model has black textures when looking at the feet for example. It's supposed to respect the colors you set in the character customization.
12 Replies
Rex
Rex2mo ago
Did you add custom data floats to the meshes? First thing I'd try.
devel
develOP2mo ago
Hooking all the UPrimitiveComponent::SetCustomPrimitiveData* for the player model. Equipment may be hooked to the BuildGun, but using the PlayerCustomizationDataChanged event it easier (although the mappings have to be hardcoded).
Archengius
Archengius2mo ago
They are hardcoded in the base game as well
devel
develOP2mo ago
When it's hardcoded in two places, it breaks when a change happens in one. Anyways, I now somehow have problems with a more basic thing: the static item mesh doesn't get the colors. I'm using the same materials and textures, the model is set up the same way as the xenozapper...
Archengius
Archengius2mo ago
yeah, but you do not have an option to not hardcode the mappings
devel
develOP2mo ago
I've mentioned an option: hooking it to the buildgun. But I don't have a problem with that part. Now the static meshes don't get color for some reason.
Rex
Rex2mo ago
Where are they supposed to get the colour from?
devel
develOP2mo ago
I'm setting the "M Conveyor Mesh" in the item descriptor. I think that the mesh of a dropped item should get the default colors.
Rex
Rex2mo ago
Sorry, I don't follow
Robb
Robb2mo ago
what does the jetpack item look like dropped on the ground? does it follow the viewing player's colors, always look orange, or always look black? that is a vanilla item that I believe follows the player's colors when equipped
Rex
Rex2mo ago
Or the Xeno-Zapper, or the Xeno-Basher I am pretty sure hand equipment uses player colours
Archengius
Archengius2mo ago
It does Dropped things just use the defaults Which honestly could be easily improved

Did you find this page helpful?