• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Unit face unit not working

Status
Not open for further replies.
Level 3
Joined
May 5, 2013
Messages
56
Hey Guys, I have made a spell in which the caster kind of "jumps" bewtween the enemies, while he is attacking them.
But, my problem is, that the caster does not face the target correctly. Even though the caster attacks the targets, he looks into another direction, and that seems weird to me. Now I want to set that the caster faces the target, but that doesnt work. First I tried to use this function:
  • Einheit - Make Caster face Target over 0.00 seconds
But This doesnt work at all, the unit still looks into another direction. I also tried to chance the "turning angle" in the object editor to the maximum, still nothing.
Then I tried something like:
  • Einheit - Move Caster instantly to (Position of Caster), facing (Angle from (Position of Target) to (Position of Caster)) degrees
Still nothing.

Can anybody help?
 
Level 3
Joined
May 5, 2013
Messages
56
I do have set them right. The damage (as an example) is triggered to the correct units. Just the "facing" part is not working :/
But "make unit face unit" is the right way to do that, apart from my problem?



Edit: I guess I found the problem, the movement speed of the caster was 0. After I set it to 1 and turning angle to 3.00 the unit now faces the other. But the is one further question I would like to ask:

How do I set the facing angle, that the caster automatically looks in the direction of the target? Because angle between points (Angle from position of caster to position target) doesn't seem the right way to me... Doesn't there have to be Arcsin somewhere!?
 
Last edited:
Level 1
Joined
Dec 21, 2012
Messages
7
Hey Guys, I have made a spell in which the caster kind of "jumps" bewtween the enemies, while he is attacking them.
But, my problem is, that the caster does not face the target correctly. Even though the caster attacks the targets, he looks into another direction, and that seems weird to me. Now I want to set that the caster faces the target, but that doesnt work. First I tried to use this function:
  • Einheit - Make Caster face Target over 0.00 seconds
But This doesnt work at all, the unit still looks into another direction. I also tried to chance the "turning angle" in the object editor to the maximum, still nothing.
Then I tried something like:
  • Einheit - Move Caster instantly to (Position of Caster), facing (Angle from (Position of Target) to (Position of Caster)) degrees
Still nothing.

Can anybody help?

Well I am a noob myself with WE, but if you are willing to take my attempt of help... you can try with this. Not sure if it will work, but I think it should.

  • Unit - Move (Casting unit) instantly to (Position of (Target unit of ability being cast)), facing (Position of (Target unit of ability being cast))
I also see you say you want to move your caster to the position of your caster...? shouldn't that be to the position of the targeted unit of the ability being cast? I may be wrong here, just saying. 04:26 am + my noobness isn't a good combo.
 
Last edited:
Level 3
Joined
May 5, 2013
Messages
56
Yes, you are right, it should be the position of the target. Its right in the world editor but I posted it wrong :/

But I cannot find "position of unit" in the "angle" function. I always thought that angle has to be a real value, and "position of unit" is not a real value but a position value...

Anyway, it kind of works, but still you can see that the caster is turning. Thats why I want him to, instatly after being moved, facing the target. But when I do this with the function "make caster face target", you can still see that the unit is turning...
 
Level 1
Joined
Dec 21, 2012
Messages
7
I used Move unit and face point (instanly).
Let me try if I can find anything with the angle one.

Edit: Can't find a way to do it instantly. And using the same formula as up there, I doubt it will work if you use it on the angle one instead of the face point.

Best I can come up with is:
  • Unit - Make (Casting unit) face (Target unit of ability being cast) over 0.00 seconds
And you use some kind of condition like ability being cast Equal to "insert your spell name here".
 
Level 3
Joined
May 5, 2013
Messages
56
Yes I guess "move unit and face point" should do it. Still doesn't look perfect but the unit now looks in the right direction.
I used:
  • Einheit - Move Caster instantly to ((Position of Target), facing (Position of Target)
Thank you anyway :D
 
Status
Not open for further replies.
Top