- Joined
- Jun 23, 2011
- Messages
- 70
Hey, so I have an idea that, if it works, might revolutionize WC3 modeling. I'm starting college in two weeks, though, and can't afford to spend the time required to make it.
Everyone at some point in their mapping/modeling career has run up against the problem of Warcraft's turning system. Most troublingly evident in models such as large dragons, slow-moving objects, and above all, wagons, carts, and other pulled objects, the system simply rotates the model on its central axis. This might be fixable for large, simple maneuvers
Now, since that looks horrible in-game, I have a suggestion.
Consider the following:
First, create two alternate animations for a horse-and-wagon style unit, with the horse and wagon at 45 degree angles, in both directions, sort of like this:
\ horse(anim1) / horse(anim2)
| wagon(anim1) | wagon(anim2)
Set the turnspeed to 0. (if it'll let you do that, otherwise maybe pause it?)
When the unit is issued an order targeting a point:
IF the unit is a horse/wagon or some other turning-troubled unit,
Cancel the last given order.
Set TurningUnit to... yeah.
Set OriginalFacing to facing of TurningUnit
Set NewFacing to the integer value of the new facing (which isn't a generic function, but finding the new angle is simple trigonometry)
In the same way, log the distance from the unit to both points, the movespeed of the unit, etc.
Next, use some math and find out whether the new point will force the unit to turn left or right. Then order the unit to change to the corresponding animation.
Then, using the movespeed of the unit and the distance to the targeted point to establish the proportions of the turn, order the unit to turn maybe .5 or 1 degree and then move slightly forward, and to repeat this about 3-5 times per second.
While doing this, you'd need to repeatedly calculate an integer value of: (The angle from the position of TurningUnit to the targeted point) minus (The facing of TurningUnit). When they become the same, then stop the turning.
I have no idea if this would work, but it'd sure be cool if it did, and it would partly solve the problem of turning for WC3 units.
Thanks for reading!
Everyone at some point in their mapping/modeling career has run up against the problem of Warcraft's turning system. Most troublingly evident in models such as large dragons, slow-moving objects, and above all, wagons, carts, and other pulled objects, the system simply rotates the model on its central axis. This might be fixable for large, simple maneuvers
Now, since that looks horrible in-game, I have a suggestion.
Consider the following:
First, create two alternate animations for a horse-and-wagon style unit, with the horse and wagon at 45 degree angles, in both directions, sort of like this:
\ horse(anim1) / horse(anim2)
| wagon(anim1) | wagon(anim2)
Set the turnspeed to 0. (if it'll let you do that, otherwise maybe pause it?)
When the unit is issued an order targeting a point:
IF the unit is a horse/wagon or some other turning-troubled unit,
Cancel the last given order.
Set TurningUnit to... yeah.
Set OriginalFacing to facing of TurningUnit
Set NewFacing to the integer value of the new facing (which isn't a generic function, but finding the new angle is simple trigonometry)
In the same way, log the distance from the unit to both points, the movespeed of the unit, etc.
Next, use some math and find out whether the new point will force the unit to turn left or right. Then order the unit to change to the corresponding animation.
Then, using the movespeed of the unit and the distance to the targeted point to establish the proportions of the turn, order the unit to turn maybe .5 or 1 degree and then move slightly forward, and to repeat this about 3-5 times per second.
While doing this, you'd need to repeatedly calculate an integer value of: (The angle from the position of TurningUnit to the targeted point) minus (The facing of TurningUnit). When they become the same, then stop the turning.
I have no idea if this would work, but it'd sure be cool if it did, and it would partly solve the problem of turning for WC3 units.
Thanks for reading!