I cannot figure out how to nor find any guides on the internet on how to add weakspots to an armored vehicle like in world of tanks or armored warfare, does anyone know how I might achieve this?
Announcement
Collapse
No announcement yet.
How does one add weakspots to a vehicle?
Collapse
X
-
Hi man ,
if you have a weapon that hit your vehicle, and do an action like explode or just damage the vehicle, add to that event some steps.
Use a raycast to check the exact point where you hit the vehicle, if you want you can check the exact mesh, if your mesh is bigger and you just nneed a weakspot in the middle, save the position of the Bullet/Ray/bomb, at the moment of the add damage .
In the vehiccle add a scene component, and place it where you want the weakpoint.
Be careful that if the mesh part moves, your scenecomponent have to be his child, to be moved with him and follow.
In case of skeletal mesh, you should instead create something to bind to the skeletal bones, because skkeletal meshes dont move/rotate ceasily.
Then Check the distance you want bertween World position of the Weapon exploding/hitting - Worldposition of scenecomponent you added.
Doing a Vector vector and using a get lenght of the vector you can check if
if is < 50 for example you hit that spot, otherwise no
-
Sorry I am having a little bit of trouble understanding what are you mean. Are suggesting that I use a hidden scene component as a collision mesh or some way of determining the location of the impact?
I am using mostly hitscan weapons like railguns, particle cannon, ect as anti tank weapons. It would probably be very inconsistent if I attempted to make it work for radial damage so I am thinking of just having explosions do a constant but low amount of damage to heavily armored vehicles.
Comment
-
Originally posted by Bits360 View PostJust use seperate hitboxes or some basic blueprint to change dmg on hit location.
As for this suggestion of using blueprints to determine whether the location of the impact is light, medium or heavy armor, would that work for a very complicated armor scheme (weakspots such as the lower plate, turret ring, drivers hatch, ect) or is it just for determining which side of the vehicle was hit?
Comment
-
Originally posted by Mikhail-N View Post
My problem is that I cannot find a way to import custom collision and even if I did I would still need to know how to add multiple collision meshes to a single object and then determine which one was hit.
As for this suggestion of using blueprints to determine whether the location of the impact is light, medium or heavy armor, would that work for a very complicated armor scheme (weakspots such as the lower plate, turret ring, drivers hatch, ect) or is it just for determining which side of the vehicle was hit?
Comment
-
Originally posted by Bits360 View Postnow that i think of it, you could use box collisions on your blueprints with a custom trace channel/object channel to only respond to bullets, which would also be on another trace/object channel, and depending on which box is hit, do damage based on that
I looked through a lot of options and could not find any "collision mesh" or "hitbox" options in the blueprint editor.
Comment
-
Originally posted by SB1985 View PostUse Event Point Damage, instead of Event Any Damage, and Apply Point Damage, instead of Apply Damage. With that you can get the hit result, break it, get the hit bone name, location, etc.
Comment
-
Physics Materials
and make the damage based on the physical material
you have to go to the project settings and create physical surfaces.
Create physicalMaterials for each section. right click > /physics/physicalmaterial
You have to apply a physical surface to the tank mesh physics asset file per bone physics.
create a function that handles the damage setting based on the physical material hit in the tank
change the damage threshold scale in teh physical material properties/details and set a physical surface type.
create a take damage event that triggers the set damage function.
It all runs off the damage threshold scale set in the physical material details. This threshold is also based on the damage output of the projectile/linetrace. 1 = full damage .1 = 10% damage. I haven't tried bigger numbers like 2 or 3 but i'm guessing you can make that sectionn "weaker" by upping the damage threshold to 2 or more for double damage taking.Last edited by MindfieldsTech; 07-21-2020, 11:07 PM.
Comment
-
Originally posted by MindfieldsTech View PostPhysics Materials
and make the damage based on the physical material
you have to go to the project settings and create physical surfaces.
Create physicalMaterials for each section. right click > /physics/physicalmaterial
You have to apply a physical surface to the tank mesh physics asset file per bone physics.
If you have ever played Warthunder, World of tanks or Armored warfare, that is what I want to try and replicate. I believe there is also a similar system is Squad.
Comment
-
Originally posted by Mikhail-N View Post
The tank is made up of static meshes (the weakspots are supposed to be sections of these) and I need to be able to precisely control where the weakspot are, so randomly generated collision is not an option.
If you have ever played Warthunder, World of tanks or Armored warfare, that is what I want to try and replicate. I believe there is also a similar system is Squad.
Comment
-
Originally posted by MindfieldsTech View Post
you can take what i mentioned and apply it to each static mesh. i never mentioned a randomly generated collision. if anything the option i provided is as direct control over the damage as possible... but your choice how you want to implement it. good luck!
Oh sorry I did not make it clear enough, I want to add multiple weakspots to a single static mesh.
I use separate meshes for separate components; hull, turret ,tracks, ect, it would be a real mess if I were to have to try and split each one into multiple in order to add weakspots.
Comment
-
Originally posted by Mikhail-N View Post
Oh sorry I did not make it clear enough, I want to add multiple weakspots to a single static mesh.
I use separate meshes for separate components; hull, turret ,tracks, ect, it would be a real mess if I were to have to try and split each one into multiple in order to add weakspots.
so instead of having the tank built up from static meshes, your process will be the same but instead the pieces will be skeletal meshes.
Comment
Comment