Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,239
So I was working on a charge related spell which turns out fine my testing map.
But in its current state is does not check for pathing, meaning it will keep trying to charge into trees.
I googled around for some ideas and use the following method.
1. decide on position to check
2. move invisible dummy unit with 16 collision size to position
3. compare distance between position and current location of the dummy unit
Which works fine in theory, but it collides with the charging unit instantly.
I googled around some more and noticed a method where you move the charging unit away and THEN check.
I tried it and it seemed to work flawlessly. Except one minor detail, I have an effect attached to my charging unit which follows the unit when it is moved away making it extremely ugly.
Is there any other method? I tried the item method but it did not seem to work for some reason.
But in its current state is does not check for pathing, meaning it will keep trying to charge into trees.
I googled around for some ideas and use the following method.
1. decide on position to check
2. move invisible dummy unit with 16 collision size to position
3. compare distance between position and current location of the dummy unit
Which works fine in theory, but it collides with the charging unit instantly.
I googled around some more and noticed a method where you move the charging unit away and THEN check.
I tried it and it seemed to work flawlessly. Except one minor detail, I have an effect attached to my charging unit which follows the unit when it is moved away making it extremely ugly.
Is there any other method? I tried the item method but it did not seem to work for some reason.