So how would one go about setting up hitzones on a target (like a bullseye for example) in UDK where you would designate a score based on exactly where you shot? I'm a newbie with UDK, but in other engines I've done this with setting up hit geometry, a seperate layer for each 'zone' of the target, and then a seperate script was written by someone else that designated score values to each zone in game. Can it be done by designating a different material for each zone? Any input or a point in the right direction would be very helpful. Thanks in advance!
Replies
http://www.letargets.com/estylez_ps.aspx?searchmode=category&searchcatcontext=~010000~010400~010403
..so the goal would be to find a method that works well for any type of target that has a scoring zone. Thanks for the tip!
Say you've already been using invisible/linked meshes as hit zones for a structure. But you want different decals to show up on the structure alone through firing an object in kismet or with a custom weapon. Is there a preferred set of tutorials out there that goes over managing physical materials for things like bullet holes and effects on a per material/perobject + per weapon basis?
Just be sure to make your target's center point/origin at the bullseye.
In the code get the distance from the object's origin/position in worldspace to the hitpoint in worldspace. Feed the distance into some routine to add points to the player's score based on the distance from center. You could expose a variable for target size and code the scoreing routine to automatically calculate n number of zones based on the largest radius.
This is assuming a round target.
for other target shapes you could do some other math to find if the hit point is within a certain polygon centered, or otherwise related to a target point within the target object. Would be good to mark the target centers or corners with a bone or socket for easy reference.
Talk with your coders. They should be able to implement this with minimal issue.