After browsing the animations and static meshes in editir, I see that the collisions of tank hulls are based on simplified 3D models, right ? Now very important question, how are AoI calculated ? Are they based on real angle to the mesh surface hit, or simply on the angles from the XYZ axis ? And how the game knows when front or side was hit ? It isn't that just all hits over 45deg are assumed to be side armor hits ? If so then :-(
Now the turrets. The Tiger turret has it's collision mesh just like the hull. Any other tanks have only collision boxes, no collision meshes... Would it be easy to add them if someone did the 3D work and produced them from turret models that are in the game ?
About those collision boxes around turrets - are they true retangular boxes or rounded shapes ? The ricochets from turrets would lead to conclusion that they are rounded (and in fact not boxes, just streached or flattened spheres). Or how is the armor angle determined ?
The AoI without collision meshes can be only described as relative to XYZ axis I suppose ?
And determination of what armor (front or side) was hit, is it based on the angle ? I'll find it in collision & penetration calcs I suppose, when I find them first...
Now what it would take, to desing a collision mesh with separate side, front and rear SURFACES (plus maybe treads and wheels) ? I suppose it would have to be a collision mesh builded from different materials named front, side ect ?
Next question, is it possible to determine during the collision the AoI relative to the surface of the 3D model (mesh) that is hit ? Or only to the major axis of the object ? If I have a flat surface but angled in two axis, or a round surface and the hit is at the edge, can I determine the true AoI in the point of the impact ?
If so, then great. In most wargames and sims, the tank surfaces are described as front & side & rear * lower & upper * turret and hull plus top and bottom. Even if the turret has no upper and lower parts, it's still at least 13 surfaces with thickness and angle data. Now the tank usually is constructed with only few kinds of armor plate, different in thickness. Usually much less than 13.
It would be actually easier to construct a collision mesh using materials based on armor plate thickness, this would give 5-10 materials to build the whole tank, and actually doesn't matter if they are on the front, side, rear or top of the tank. The only thing that is important is the thicknes and angle. Thickness is based on material, the angle is calculated during the collision for the armor part that is hit.
Now I'd like somebody to tell me if it is possible to read the actual AoI at the point of impact between the mesh part and projectile trajectory ? For a flat or complicated surface ? If I make a collision mesh at a shape of a sphere and hit it near the edge, would I be able to read the true AoI from the collision event ?
And second question, can I give custom parameters to the materials used in collsion mesh construction, that would be later passed to collision calculations ? If not, I can at least name it and later read the armor thicknes from a table (of material names and properites) in my own collision/penetration calcs, right ?
Regards
P.S. Where to look for the function/class/whatever of projectile collision, that has ricochet and penetration calculations in it ?
edit: is it ROTreadVehicle in ShouldPenetrate ?
edit: yeah, found it. The table within GetPenetrationProbability seems to have nothing to do with penetration probability, as it's called in calculations of penetration value and decreases tabular penetration value with angle, so effectively controls ricochets. It has nothing to do with any known angled armor resistance function and in fact looks like probabilistic data... I though initially than it controls penetration probability (as named) and gun penetration has to be 12 points greater than armor resistance to have 100% penetration chance... but seems not be the case.
Wrong used ? Why a probabilistic-looking set of data named "probability" is used to calculate projectile penetration at angle ??? Well for the current purpose this table is wrong and this is where the overmodelled ricochets are born.
Or tell me I misunderstood something... Because the process doesn't look quite like described by Wilsonam in post #3.
Let's assume that it REALLY IS ricochet probability calculation based on armor rating and angle... even if so, the function doesn't look like true ricochet probability at all... it's even closer to penetration calcs than ricochet calcs... and there isn't even any probability in it , in same conditions the result will be always the same - either penetrates or deflects.
So would "true" penetration calcs be repeated/done in damage section ? I will analyse it tomorrow to check. And what would happen if the round doesn't penetrate ? Another kind of ricochet ? edit: the ArmorFactors are not used in TakeDamage function, don't see ArmorFactor word used anywhere but in vehicle classes, so don't think that there are second "true" penetration calculations done later because would be hard without knowing the base armor value... :-/
Anyway the initial ricochets are completly wrong... I'm starting to think about a small mod (mutator?), I hope when I have all the calcs in scripts corrected, someone will help me to package it... Would be a code only mod, so should be very small.
The wrong ricochet table would not be wasted, it's very good handy to calculate real probability of penetration when re**** is within few % from pen. threeshold, with random number generated to check the result...
edit: what a mess... sorry, no offensive