2 bugs found after v3 update - ImpactLayers and Race condition issue when changing UCL view types via states

Hi,

1) The projectile module has ImpactLayers property that I set to just 1 layer, but spawning a projectile from the RPG in the demo scene doesnt affect the ImpactLayers even if I change them on the RocketProjectile itself they are overriden, I guess the InitializeProjectileProperties is getting called with the last argument being with last value being false which reverts the impact layers to a default state. Try it with the rocket launcher and the projectile on the demo scene

2) This worked fine on v2 but has a problem after updating to v3 ( using the new unity input system if it matters ). I want to be able to rotate the camera around the character while not moving (UCL is in Adventure Mode) and when I press a key go to Combat Mode via a State changing the viewtype. What happens is when I press S or A or D the animator plays a *turn* animation for 0.1 seconds and snaps back into combat mode and plays the proper animation. I guess it goes like this Input event - animator update - applying UCL state. I'm 100% sure v2 didnt have this problem.
 
1) The projectile module has ImpactLayers property that I set to just 1 layer, but spawning a projectile from the RPG in the demo scene doesnt affect the ImpactLayers even if I change them on the RocketProjectile itself they are overriden, I guess the InitializeProjectileProperties is getting called with the last argument being with last value being false which reverts the impact layers to a default state. Try it with the rocket launcher and the projectile on the demo scene
Tagging @Sangemdoko

2) This worked fine on v2 but has a problem after updating to v3 ( using the new unity input system if it matters ). I want to be able to rotate the camera around the character while not moving (UCL is in Adventure Mode) and when I press a key go to Combat Mode via a State changing the viewtype. What happens is when I press S or A or D the animator plays a *turn* animation for 0.1 seconds and snaps back into combat mode and plays the proper animation. I guess it goes like this Input event - animator update - applying UCL state. I'm 100% sure v2 didnt have this problem.
When you changed to combat did you also change the movement type? Can you tell me how to reproduce it in the demo scene? I just switched from the adventure to combat zone in the demo scene and things looked correct.
 
1) The projectile module has ImpactLayers property that I set to just 1 layer, but spawning a projectile from the RPG in the demo scene doesnt affect the ImpactLayers even if I change them on the RocketProjectile itself they are overriden, I guess the InitializeProjectileProperties is getting called with the last argument being with last value being false which reverts the impact layers to a default state. Try it with the rocket launcher and the projectile on the demo scene
You are right, it should be using the values on the projectile prefab.

It should be using the layer within "m_DefaultImpactDamageData", is that the one you have set?

There a 3 things called ImpactLayer and they all do different things... @Justin I think we should probably make a name refactor on those to make it slightly more clear

1) The shooter impact layer is for aiming and checking the raycast before shooting
2) The Porjectile base class TrajectoryObject has a impact layer for when the object is thrown
3) The ProjectileBase class has an impact layer within the defaultImpactDamageData

1675253205781.png

1675253080637.png
 
You are right, it should be using the values on the projectile prefab.

It should be using the layer within "m_DefaultImpactDamageData", is that the one you have set?

There a 3 things called ImpactLayer and they all do different things... @Justin I think we should probably make a name refactor on those to make it slightly more clear

1) The shooter impact layer is for aiming and checking the raycast before shooting
2) The Porjectile base class TrajectoryObject has a impact layer for when the object is thrown
3) The ProjectileBase class has an impact layer within the defaultImpactDamageData

View attachment 10277

View attachment 10276
I didnt see the 3rd one because my collide mode was set to reflect and the damage data gets hidden but it still takes it... My projectile was doing 2x damage so please dont hide that damage data when the mode is Reflect. I lost a few hours digging through code trying to find out why the projectile was doing 2x damage.

+ Can you consider adding crosshair scale property on each weapon because sometimes my crosshairs are very small especially if I only use a center crosshair while some that use all 5 sprites are huge, so one size does not fit all the guns. Even scale changer on the main Crosshair UI object will work dont need to be all 5.
 
Last edited:
Tagging @Sangemdoko


When you changed to combat did you also change the movement type? Can you tell me how to reproduce it in the demo scene? I just switched from the adventure to combat zone in the demo scene and things looked correct.
@Justin

The problem is caused because my Motor Rotation Speed was set to 10, but even something as small as 1 will make you see the issue when switching. It is not animator related.
 
Top