Page 1 of 1

What changed between .87 and .89 to cause this

Posted: 18 Aug 2012, 16:20
by aGorm
! change Spring.GetUnitPosition to return a unit's base-position by default, like .GetFeaturePosition does for features
(this is usually a point on the model closer to the ground than its mid-position, so may affect some Lua drawing code)
I think this has borked my script, but I'm not sure what it means?

Image

Is there some way to get the old behavior back?

http://pastebin.com/u9S9g22u <-- script.

Thanks

aGorm

Re: What changed between .87 and .89 to cause this

Posted: 18 Aug 2012, 16:33
by jK
! remove modelCenterOffset tag (can now be dynamically set with Lua)

Re: What changed between .87 and .89 to cause this

Posted: 20 Aug 2012, 01:17
by knorke
hm, isnt the change that in 87 GetUnitPosition returned the center of the model ("the hip") and in 89 it returns where the unit touches the ground? ("the feet")

if so, change to
unitposx,unitposy,unitposz = Spring.GetUnitPosition(unitID, true)
or is it (unitID, false, true)

Spring.GetUnitPosition
( number unitID, [, boolean midPos [, boolean aimPos ] ] )