Weep
Godspeed to the sound of the pounding
- Reaction score
- 400
I'm hoping to implement a dragging method that uses WC3's native collision, so the dragged unit can slide around other units and doodads and terrain, but without interrupting its actions.
SetUnitX/Y ignores collision, and SetUnitPosition interrupts whatever it's doing, AFAIK. Also, using a pathability library would mostly just keep the unit from sliding if something is in the way, which isn't what I want.
I thought about creating another unit of the same unit-type and using SetUnitPosition on it and SetUnitX/Y to move the real unit to the position of the stand-in unit, but this has the problem of the stand-in colliding with the original unit if the offset is too small. Moving the original unit temporarily out of the way first runs the risk of unintentionally tripping region-entrance triggers, or stopping ranged spells like Life Drain.
Any suggestions?
SetUnitX/Y ignores collision, and SetUnitPosition interrupts whatever it's doing, AFAIK. Also, using a pathability library would mostly just keep the unit from sliding if something is in the way, which isn't what I want.
I thought about creating another unit of the same unit-type and using SetUnitPosition on it and SetUnitX/Y to move the real unit to the position of the stand-in unit, but this has the problem of the stand-in colliding with the original unit if the offset is too small. Moving the original unit temporarily out of the way first runs the risk of unintentionally tripping region-entrance triggers, or stopping ranged spells like Life Drain.
Any suggestions?