Shooting and impact

Sergey Bespalov

New member
Hello.
Q1:
I had a simple ragdoll without animator. It was reacting on hits (from shooting) correctly. When I had added the Health.cs script to the ragdoll it stopped react to hits(from shooting). When I had added Health.cs to the simple box, this box was reacting on hits correctly. Why did not ragdoll reaction on hits when it had Health.cs?
Q2:
How can I detect shooting through trigger collider? I want to do some action when player shoot through trigger collider.
 
I had a simple ragdoll without animator. It was reacting on hits (from shooting) correctly. When I had added the Health.cs script to the ragdoll it stopped react to hits(from shooting). When I had added Health.cs to the simple box, this box was reacting on hits correctly. Why did not ragdoll reaction on hits when it had Health.cs?
Are you adding the health script to a character or non-character? If you are adding it to a character you'll need to make sure you have the ragdoll ability added.

How can I detect shooting through trigger collider? I want to do some action when player shoot through trigger collider.
This will require modification of all of the scripts so the casts do not use QueryTriggerInteraction.Ignore. Since this would be such a major change and would be a pain to merge with updates I recommend changing your game design so triggers are not impacted and instead use a separate layer.
 
Are you adding the health script to a character or non-character? If you are adding it to a character you'll need to make sure you have the ragdoll ability added.
Thx for answer. No it is not a character. Just rigged 3d model, I created ragdoll via "Create->3d object->Ragdoll". I added Health.cs script to the top object in hierarchy of 3d model.
 
The health component isn't aware of a ragdoll so it shouldn't be messing with it at all. The ragdoll ability only activates when the character dies.
 
Justin. I have recorded a a little video with my trouble. Could you look at this?
Short description: ragdoll didn't react on hit if it had Healt.cs script.
 
Top