| 07-14-2006, 06:35 PM | #2 |
The easy way is to let warcraft take the derivative numerically. Place a dummy unit ahead of the projectile in the trajectory and stare at it JASS:native SetUnitLookAt takes unit whichUnit, string whichBone, unit lookAtTarget, real offsetX, real offsetY, real offsetZ returns nothing native ResetUnitLookAt takes unit whichUnit returns nothing call SetUnitLookAt(udg_projectile,"bone_chest",udg_leader,0.,0.,0.) |
| 07-14-2006, 06:39 PM | #3 |
Hrm... That seems to be a very clever way to go about it. I'll experiment with that idea and see how it works out -- Thanks a lot. |
| 07-14-2006, 06:59 PM | #4 |
I blame BLizzard . Some how SetUnitLookAt makes the model reset the bone position a little before setting it again. So it doesn't look right, I was going to add that to the caster system. Reminds me that I need to make a modeller make a model with 90 variations of the stand animation with different z axis and then do SetUnitAnimationById |
| 07-15-2006, 09:58 PM | #5 |
I tried the method Pipe suggested and well, as Vex mentioned it looks funky and makes it look the correct angle then down then to the correct angle, and so on. It wasn't really fluid at all. Was there another method to achieve this effect? Or am I going to have to wait for Vex to make that model? |
| 07-15-2006, 10:02 PM | #6 |
It sounds like you're calling SetUnitLookAt multiply. You only need to set it once. |
| 07-15-2006, 10:04 PM | #7 |
Nope, SetUnitLookAt is bugged |
| 07-15-2006, 10:05 PM | #8 |
| 07-15-2006, 10:11 PM | #9 |
Perfect. Absolutely perfect. I'll try it right away. Thank you all very much for your time. |
| 07-15-2006, 10:39 PM | #10 | |
Quote:
What you CAN do however, is create a dummy unit for the dummy unit to look at. Makes sense? yes. The first unit to which the the special effect is added will then only call the setlookat once, meaning it will not reset. Instead, you move the unit he is looking at around. |
| 07-15-2006, 10:54 PM | #11 |
that's overkill |
| 07-15-2006, 11:09 PM | #12 |
I dont see why that would be overkill, moving a unit wouldnt be slower than setting lookat... It's how ani and I make all our maps :P (actually, ani mostly scripts them :P) |
| 07-15-2006, 11:12 PM | #13 |
But if it is an already heavy projectile system creating 2 dummies per projectile and requiring to move 2 units each time is overkill |
| 07-15-2006, 11:35 PM | #14 |
So it does work? ![]() |
| 07-15-2006, 11:36 PM | #15 |
In the case of using it for an AoS map, I decided to go with the model. I can sacrifice 34kb for the model, and quite frankly it makes less unit creating and such. If it were for a cinematic or some such I'd probably use the SetUnitLookAt, but for now this should work. If I decide to change it later, I may do that. I don't want to tread on sketchy waters when I know this will work just as happily. Thanks again. :D |
