saindd Posted June 12, 2015 Share Posted June 12, 2015 The built-in T3D function Player::getDamageLocation() is responsible for detecting the vertical position of the hit based on the player model bounding box and deciding if it was a head, body or leg shot. However, i have a few questions about the feature: How does it handle near-misses? Does it check the bounding box and then the model? What if i hit a bullet next to ear, but miss it by inches? Will it still hit, like old 2D games and square bounding boxes?What about crouching and proning? How does it handle it?Is there a more modern way of detecting hits in T3D? Like, having several different physics colliders attached to the player, so we can detect a proper arm/leg shot, head, throat, lower body, upper body, etc. In Unity, we can parent physics colliders to bones, and then, bone-based damage.Can we get the nearest bone name during a raycast? The bone acting on that vertex/face? Quote Link to comment Share on other sites More sharing options...
chriscalef Posted June 12, 2015 Share Posted June 12, 2015 I'm doing pretty precise locational damage with my Physx3 implementation, unfortunately it's not really production ready yet but you can check it out on my github, physx3_advanced_WIP branch:https://github.com/ChrisCalef/Torque3D/tree/physx3_advanced_WIPI don't have a ready solution for you in stock Torque, however. Quote Link to comment Share on other sites More sharing options...
Duion Posted June 13, 2015 Share Posted June 13, 2015 The damage based on bounding box location works, but it is very primitive, so no way to tell if the ear was hit, not even the head can be measured very accurate. Crouching just reduces the size of the bounding box thing, there are values for it in the player datablock "crouching bounding box" or something. Prone will pretty much break the system, since it is built for vertical standing players.There is a resource in the garagegames resources section where someone presents code for hitboxes, so you can have hitboxes on your player and the code will tell what has been hit, would be cool if someone could get it to work, since I want that also. Quote Link to comment Share on other sites More sharing options...
rlranft Posted June 15, 2015 Share Posted June 15, 2015 Here's the default hit box location chart:http://www.roostertailgames.com/TorqueRef/content/documentation/Artist%20Guide/Primer/torque_character_primer.htmlIt ain't pretty.... Quote Link to comment Share on other sites More sharing options...
Duion Posted June 15, 2015 Share Posted June 15, 2015 Ugly, but unfunctional.I always wondered why you need a front right, front left etc hitzones. Front, back, side would make more sense. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.