I am making a game in which i use static mesh cube as object and i want to destroy it when i fire a bullet ( or Line trace or Projectile ball ) on it.so how i can destroy it when i fire bullet on static mesh.
you just need a reference to the object to destroy then use the destroy actor node. so in the case of a projectile actor you could use a on hit event then use the other actor pin as the target for a destroy actor. if using a line trace you would use the hit result.
I try this but i got a new problem that all the static mesh present in game is destroying ( boxes and floor which is present in game are also destroying when trace is hit ).
I want to destroy only the bottles when trace is hit
In that case you just need to add in another check. I would either use a custom collision channel or ise tags. If using tags you can just get the other actor and i believe theres a node for has tag.
Like this ?
yea basically. then you just need to select the actor class you want to be able to destroy and give it the needed tag.
your basically just looking for indicator in the actor that tells you this is one i want to be destroyable.
see this , please help me