Decals and Impact Effect

Mattis

Active member
Hello! Something weird is going on with bullet decals.. Im using the allready made surface system and everything, I just change the impact effect, sounds and decals....
Im using Bullet Impact FX from assetstore... The sounds from that asset work with opsive UCC... BUT for some reason the impact effect prefab dont work from the asset, and its made like your own, it spawns, but wont play any particle effects, its on parent with childs (sparks, debris, smoke etc) ?

the other problem is the decal, its like your demo decal, same setup, same shader, same rotation and position (o,o,o) but its rotated wrong when it spawns, not facing the camera, -90 in rotation wont work neither, because for some reason opsive ucc is forcing it to be rotated wrong, why? the demo decal is rotated like it should.

Thanks
 
I haven't used that asset so I don't know how it is setup, but if you use the demo assets does everything work? If so, can you reconfigure the Bullet Impact FX assets to be in the same orientation?
 
Well, it's nothing special about them, and they are the same as the demo(demo works)... They contain the same texture import settings, the same shader, made with unitys Particle system.. And it doesn't matter Wich orientation it is because somehow opsive force them to always be oriented the wrong way, doesn't do anything if I rotate, because they are just simply rotated wrong when they are spawned.. it's only 1 game object just like the demo decal... Both the decal and the particle effects are the same as the demo... Can I send them to you so you can see for yourself and just witness this that I ain't dumb..
 
So demo decal rot and pos is 000 on xyz... and that one gets spawned correctly... Bullet Impact FX decal is also 000 on xyz... Bullet impact FX decal gets an rotation of -90 automatically somwhere in UCC script , why ?? And I see that the Demo decal also get the rotation -90, but that one you can still see.. and it dosent matther if I rotate the Bullet Impact FX its still gets the -90 rotation that seems to be the default here, how do I fix this ?
 
I dont care about the Z rotation I understand why it does that now, but I dont want it to rotate Y, or it should at least face the right way
 
It dosent mather what value I make, if I rotate it 180 to face camera, opsive spawns it 270 so it sure as hell wont face the camera, I mean what :D :D
 
okay, so the issue was that the Mesh filter on the Bullet Impact FX had an faulty mesh, when I tried searching for it, I got sent to assets/Standard assets, wich I never import.. Maybe some assets demands that? Anyhow, I used Box01 from your demo decal and yeah it worked! one issue touh!!

When I shoot my 500 bullets, the decal starts to shrink, I have set the prefab to 0.3 on xyz.. and min max to 0.3, cause I want it to be 0.3... But it keeps changing size and gets reallly small , impossible to see...? Ideas?
 
I also got the VFX working, but what does this mean?

Material doesn't have a color property '_Color'

UnityEngine.Material:get_color()
Opsive.UltimateCharacterController.SurfaceSystem.DecalManager:CacheMeshAndRenderer(GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/DecalManager.cs:198)
Opsive.UltimateCharacterController.SurfaceSystem.DecalManager:SpawnDecal(GameObject, RaycastHit, Quaternion, Single, Single) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/DecalManager.cs:148)
Opsive.UltimateCharacterController.SurfaceSystem.DecalManager:SpawnInternal(GameObject, RaycastHit, Single, Single) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/DecalManager.cs:87)
Opsive.UltimateCharacterController.SurfaceSystem.DecalManager:Spawn(GameObject, RaycastHit, Single, Single) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/DecalManager.cs:75)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceEffect:SpawnDecal(RaycastHit) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceEffect.cs:118)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceEffect:Spawn(RaycastHit, Vector3, Single, GameObject, Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceEffect.cs:90)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:SpawnEffectInternal(RaycastHit, Collider, SurfaceImpact, Vector3, Single, GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:213)
Opsive.UltimateCharacterController.SurfaceSystem.SurfaceManager:SpawnEffect(RaycastHit, SurfaceImpact, Vector3, Single, GameObject) (at Assets/Opsive/UltimateCharacterController/Scripts/SurfaceSystem/SurfaceManager.cs:176)
Opsive.UltimateCharacterController.Items.Actions.ShootableWeapon:HitscanFire(Single) (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/ShootableWeapon.cs:1005)
Opsive.Shared.Game.SchedulerBase:AddEventInternal(Single, InvokeLocation, Action`1, Single)
Opsive.Shared.Game.SchedulerBase:Schedule(Single, Action`1, Single)
Opsive.UltimateCharacterController.Items.Actions.ShootableWeapon:Fire(Single) (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/ShootableWeapon.cs:759)
Opsive.UltimateCharacterController.Items.Actions.ShootableWeapon:UseItem() (at Assets/Opsive/UltimateCharacterController/Scripts/Items/Actions/ShootableWeapon.cs:677)
Opsive.UltimateCharacterController.Character.Abilities.Items.Use:LateUpdate() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/Abilities/Items/Use.cs:638)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:LateUpdateActiveAbilities(Ability[], Int32&) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1034)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:LateUpdateUltimateLocomotion() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1020)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:UpdatePositionAndRotation() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:835)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:UpdatePositionAndRotation(Boolean) (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:517)
Opsive.UltimateCharacterController.Character.CharacterLocomotion:OnAnimatorMove() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/CharacterLocomotion.cs:1453)
Opsive.UltimateCharacterController.Character.UltimateCharacterLocomotion:OnAnimatorMove() (at Assets/Opsive/UltimateCharacterController/Scripts/Character/UltimateCharacterLocomotion.cs:1764)



If it some script from opsive side who is trying to alter with the material properties on spawned VFX so it dont need to, where do I find that?
 
Glad you are making progress. Are you using a different render pipeline? If so if you'll need update the color material property name. This page explains it in step 9:


I will take a look at the decals changing scale over time.
 
Yes, it's really fun, I have been working on this game idea for so Long , but only recently really setting up ucc with my own stuff..
Nope I'm using the standard, could it be some Particle shader who are not supported by ucc? Or if theres some color randomness in some script wich would randomize particles? At first I thought it was random spin but no (wich is btw a great function)

Yes, please do:) It's quite annoying
 
It probably is the particle shader. The DecalManager looks for a Color property so it can fade the material out over time. I can add a check so you don't get that error, but I actually think that will make things harder because then you'll just notice the decals popping out and not fading.
 
Yes, I'm using asset dev shader, but it also looks the same with the standard so I could use that. But send a check anyhow.
 
About shrinking decals, it's seems to be gone when I'm using unity standard shaders. btw this is a good system you made!! Plans for mesh decal instead of collider?
 
Top