• 🏆 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!

Cliff climbing

Status
Not open for further replies.
Level 8
Joined
Aug 5, 2014
Messages
194
Hello, everyone!

Im certain that there is somewhere is existing what im asking about, but cant find. Im talking about system, that replicated collosus movement from sc2 or spiderclimb, where unit can traverse cliffs. I tried to do it in a chep way, giving unit flying movement type, but as you already understand, it not work as intended, sure unit can "climb" now, but it pass trough other units and soft terrain height change, when it "climb" over the cliff give out that unit as actually just a cheap flyer. I tried to find already existing solution, but had no luck. Can you help me find me something similar to what i want, or give an advise, how to do it.

Thank you!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
I do not think Warcraft III supports the required features to implement this beyond a "cheap flyer" or other equally hacky approaches.

In StarCraft II there were special mechanics to support walking over cliffs but not other unwalkable terrain. There were also collision layers which allowed the colossus to ignore small ground units while still colliding with bigger ground units such as themselves.

The walking animation was done similar to the "cheap flyer" approach but relied on inverse kinematic animations for the legs to touch the ground in a convincing way as well as rotation locking so the leg facing never changed. I do not think Warcraft III supports inverse kinematic animations even with reforged graphics. Warcraft III might support animation facing locking as it is used by the various Night Elf ancient trees, but using this in the same way might not be possible and certainly would not be easy.
 
Level 8
Joined
Aug 5, 2014
Messages
194
I do not think Warcraft III supports the required features to implement this beyond a "cheap flyer" or other equally hacky approaches.

In StarCraft II there were special mechanics to support walking over cliffs but not other unwalkable terrain. There were also collision layers which allowed the colossus to ignore small ground units while still colliding with bigger ground units such as themselves.

The walking animation was done similar to the "cheap flyer" approach but relied on inverse kinematic animations for the legs to touch the ground in a convincing way as well as rotation locking so the leg facing never changed. I do not think Warcraft III supports inverse kinematic animations even with reforged graphics. Warcraft III might support animation facing locking as it is used by the various Night Elf ancient trees, but using this in the same way might not be possible and certainly would not be easy.
Sorry for replying late, can you recall something close to it on hive, even based on a cheap flyer?

Thank you!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
An idea that may work:

Periodically check the terrain height in front of your unit. If the height of the terrain jumps up or down by 128.00 units that should mean that there is a difference in cliff height. Alternatively, I believe you can use an Item to detect pathing as well, this is done by many Knockback/IsTerrainPathable systems which you can find on Hive. Then in response to the change in terrain height you could enable the "colossus movement". I think periodically sliding the unit forward using the SetUnitX/Y functions may serve well since you could retain unit control but still clip through desired objects. You could also make checks periodically for things that should impede the movement of the colossus and prevent the SetUnitX/Y functions from running if those cases arise. Lastly, you'll have to figure out when to disable the special colossus movement once the unit is no longer traversing a cliff.

The real trick would be getting this to work with movement orders where you tell your unit to go from Cliff Height A to Cliff Height B since the pathfinding is going to create issues for you. Maybe it'd be better to make the unit having Flying height and mimic it's ground height with methods similar to what I described above.

Regardless of what you decide to try this will be no simple task and requires a combination of janky workarounds that don't guarantee consistency. That being said, I think if done properly it could work well and the minor hiccups here and there could be overlooked. Keep in mind that this type of thing doesn't readily exist for a reason, it's no easy task and the "solution" may have issues. You'll probably have to make some compromises.
 
Last edited:
Status
Not open for further replies.
Top