• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Unit Position Problem

Status
Not open for further replies.
Level 5
Joined
Aug 7, 2012
Messages
68
Hello there,

I have a weird problem with the placement of units. Positions of units in WE and in game do not exactly match. In game, they seem to be positioned to a bit to the left of where I put them originally. I haven't noticed this before but after noticing it, I have tested it on several of my maps and it is the same. Below are two screenshots that will better explain what I am trying to say :

In WE :

Weirdbug2 | HIVE

In game :

Weirdbug1 | HIVE

I tried setting collision size to zero and movement type to none but it doesn't help. Removing the bushes you see around the units also won't help. Is it supposed to be like this ? Can I fix it somehow ?

p.s. I just created an entirely new map and it is the same.

Thanks in advance.
 
Last edited:
Level 10
Joined
Dec 11, 2009
Messages
234
Yes, this is very annoying. It was like that since the earliest versions of WC.

Can I fix it somehow ?
Using these right after the initialization should work (but you need to set up the coordinates manually, which is awful):
JASS:
native          SetUnitX            takes unit whichUnit, real newX returns nothing
native          SetUnitY            takes unit whichUnit, real newY returns nothing
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
WorldEditor does not factor in unit collision size. When a unit is created, e.g. when creating the pre-placed units, it gets displaced so as to not intersect with the collision of any other units. If the unit is flying it will even displace over time similar to StarCraft II with the same performance pitfalls.

Honestly from the screenshots I cannot see any difference with the Acolyte displacement between the two images. You will probably need to annotate them to emphasize.
 
Level 5
Joined
Aug 7, 2012
Messages
68
Yes, this is very annoying. It was like that since the earliest versions of WC.


Using these right after the initialization should work (but you need to set up the coordinates manually, which is awful):
JASS:
native          SetUnitX            takes unit whichUnit, real newX returns nothing
native          SetUnitY            takes unit whichUnit, real newY returns nothing

So, it has been like this forever ... I see. Thanks for letting me know. I guess I will just have to live with it.

WorldEditor does not factor in unit collision size. When a unit is created, e.g. when creating the pre-placed units, it gets displaced so as to not intersect with the collision of any other units. If the unit is flying it will even displace over time similar to StarCraft II with the same performance pitfalls.

Honestly from the screenshots I cannot see any difference with the Acolyte displacement between the two images. You will probably need to annotate them to emphasize.

So, if I put a flying unit somewhere on the map then leave it on for an hour and come back, the unit will be at somewhere else even though it had absolutely no interactions with anything else ? This may explain the disappearing zeppelin problem I had a while back on my map, it was driving me crazy. I somehow fixed it but the -zfix command still exists which is a reminder of those times.

Also, If you look closely to the acolyte on the left, it is very close to the brazier in the world editor which is not really the case in the other screenshot taken from the game itself.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
So, if I put a flying unit somewhere on the map then leave it on for an hour and come back, the unit will be at somewhere else even though it had absolutely no interactions with anything else ?
Flying units will only displace each other if colliding with other flying units and not moving.
Also, If you look closely to the acolyte on the left, it is very close to the brazier in the world editor which is not really the case in the other screenshot taken from the game itself.
I see now. One has to look at the blob shadows of the Acolyte. Have you tried reducing the Acolyte collision radius in the object editor?
 
Status
Not open for further replies.
Top