How do I destroy only one object that is part of a group tagged foe?
I figured I could use the tags that are on the items as apposed to the gizmo tag to classify some objects to be destroyed. But I cant seem to figure out how to connect or make it so that it only destroys one of the objects classified as foe.
The objects are quite close together, and I'm using the raycast to detect when it hits one of the objects. It seems that I have to connect the destroyer to every object that I want to destroy, and then it destroys them all at once.
I cant just connect it the foe tag somehow. I don't know I'm kind of lost. Do I have to create a separate destroyer and gizmo tag for each object?
-
I may not be following this correctly so apologies if I get this wrong.
If you want to destroy separate parts of an object you will need a separate destroyer for every part as this is how the game will know which part to destroy. If you have loads of identical destructible parts you could make them an element and update the source to update them all at once. Not sure if this workflow applies to what you are doing though.
If you are having trouble isolating the specific part you are targeting you could move a really small health modifier to the hit position of the laser pointer. The damage modifier should also probably be turned on when he laser hits a surface. That way it should only touch one part at once.
Let me know if I have the wrong end of the stick and if I can help more.
Cheers,
Peter -
Hi, thanks, its in this project.
https://indreams.me/scene/ZPUtS2YItuk
Not sure if its updated to the latest version but I'm trying to get the lightning to destroy the buildings one at a time. Not sure what you mean about making them an element and updating the source?
댓글을 남기려면 로그인하세요.