Hitbox Node Problems
by John Eckhardt · in Torque Game Engine · 10/14/2007 (9:10 pm) · 0 replies
I am having a bit of trouble with this resource: http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3374
I have successfully integrated the code and scripts, but didn't do the newer CheckSwing function (I don't think my problem is related to that). The in-engine-code-defined box sticking out from the head works correctly, causing damage every half second.
My problem is that when I get rid of the engine defined box and mount my own melee weapon, the bounding box is not correctly positioned. Not only the visual representation of the box is incorrectly positioned, but if I extend the size of the box through the Sword.cs script, it causes no damage.
I can mount and unmount images from scripts, so that works.
I have tracked down the error to getNodeTransform(). It seems that it returns -1 when the node is not found. Whenever I mount a melee weapon to a character, be it server or non-server, it can not find the nodes which I specified in script.
I got the names from Torque Show Tool, and even switched to an official model for the melee weapon so that I could be absolutely sure the nodes were set up correctly. I walked through the code, and the script has transferred the proper node name to the weapon, e.g., it searches for the node "right arm". In the register function, it properly sees the nodes as well. Any help towards this would be apreciated. greatly.
I have successfully integrated the code and scripts, but didn't do the newer CheckSwing function (I don't think my problem is related to that). The in-engine-code-defined box sticking out from the head works correctly, causing damage every half second.
My problem is that when I get rid of the engine defined box and mount my own melee weapon, the bounding box is not correctly positioned. Not only the visual representation of the box is incorrectly positioned, but if I extend the size of the box through the Sword.cs script, it causes no damage.
I can mount and unmount images from scripts, so that works.
I have tracked down the error to getNodeTransform(). It seems that it returns -1 when the node is not found. Whenever I mount a melee weapon to a character, be it server or non-server, it can not find the nodes which I specified in script.
I got the names from Torque Show Tool, and even switched to an official model for the melee weapon so that I could be absolutely sure the nodes were set up correctly. I walked through the code, and the script has transferred the proper node name to the weapon, e.g., it searches for the node "right arm". In the register function, it properly sees the nodes as well. Any help towards this would be apreciated. greatly.