In my game I can swing a sword. I want the damage delivered to vary according to the enemies’ bone that gets hit (or body part) and the speed of the sword swing.
Any ideas?
Thanks.
In my game I can swing a sword. I want the damage delivered to vary according to the enemies’ bone that gets hit (or body part) and the speed of the sword swing.
Any ideas?
Thanks.
When the sword hit an enemy, do a trace to see which bone its hit.
For the sword, the sword itself measuring the speed of the sword, u might need a scene component on the sword for the sword speed measurement.
Since the sword is moved by the mouse freely, would it also work if I used the distance of the mouse per frame to calculate speed and determine the damage?
it does work, but it might affected by screen DPI
and depend on your game, using mouse speed might be inaccurate real sword speed