Two related requests.
1) Allow us to specify the unit's y-position in addition to x and z.
2) Allow us to somehow instruct Spring not to make a unit in midair fall toward the ground. This may be more of an engine request than a Lua call-in one. If there's already a way to do this that's not simply setting a unit's y-physics to 0 every frame, let me know.
[edited for proper title]
[call-out REQ] SetUnitPosition(y) & SetNoFall
Moderator: Moderators
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
[call-out REQ] SetUnitPosition(y) & SetNoFall
Last edited by Felix the Cat on 28 Sep 2007, 03:34, edited 1 time in total.
Re: [call-in REQ] SetUnitPosition(y) & SetNoFall
Spring.MoveCtrl fulfills all your requests.
Atm there is no wiki for it, so you have to look it up in the source
Atm there is no wiki for it, so you have to look it up in the source
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
Re: [call-in REQ] SetUnitPosition(y) & SetNoFall
Thanks for the quick answer! I'll be looking that up.jK wrote:Spring.MoveCtrl fulfills all your requests.
Atm there is no wiki for it, so you have to look it up in the source
Example code:
There's tons of other MoveCtrl functions as well, tough their a bit hard to figure out sometimes.
Code: Select all
Spring.MoveCtrl.Enable(unitID)
Spring.MoveCtrl.SetGravity(unitID, 0)
Spring.MoveCtrl.SetPosition(unitID,x,y,z)
- Felix the Cat
- Posts: 2383
- Joined: 15 Jun 2005, 17:30
-
- Posts: 854
- Joined: 28 Jan 2005, 18:15