2025-07-20 02:50 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003545Spring engineLuapublic2013-03-11 00:37
Reportermsafwan 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version93.0 
Target VersionFixed in Version 
Summary0003545: AddUnitImpulse() cause unit to move in random direction.
DescriptionBasically, if you do this every frame: (to floating ground unit)

       Spring.AddUnitImpulse(unitid, 0,-anyImpulseValue,0)

the unit will move sideway randomly.

this is really sad thing for me, because I could no longer implement feature that require accurate impulse anymore :*(
Additional InformationNote: this also happen in Spring 92++,
this did not happen in Spring 91.0 and Spring 91++
could not test in Spring 92.0 because GUI didn't appear.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0010029

msafwan (reporter)

IMO it behave similar to a glitch that happen when unit spawn inside another unit, but I didn't see anything in debug view tho...

I hope this help

~0010030

Kloot (developer)

1) _why_ are you applying impulse into the ground?
2) wtf is a "floating" ground unit?
3) does not reproduce on flat terrain, units on slopes will move sideways which is expected

~0010031

msafwan (reporter)

Last edited: 2013-03-11 00:31

View 5 revisions

hi Kloot.

I launch (ground) unit into sky with an impulse (like a cannon), then I constantly push it downward with a constant amount of impulse every frame, so it curve downward.

This work alright on Spring 91 and 91++,

But in Spring 92 and 93 it goes sideway randomly rather than curve smooothly downward. So this kind of bug make everything I did for the curved motion failed because I don't know why it go sideway since didn't even give impulse in x or z direction! unit is flying, so no terrain is touching it...
============
UPDATE:
here's how the impulse value would look like. http://pastebin.com/aCqqUCFA (it show a real case that I apply to a unit which cause this jerky random motion sideway, tested at SmallDivide map)
every frame I do this:
Spring.AddUnitImpulse(id,0,1,0)
Spring.AddUnitImpulse(id,xImp,neededImpulse-1,zImp)

The downward push is not constant because something is messing with the unit speed.

I hope this help :)

+Notes

-Issue History
Date Modified Username Field Change
2013-03-10 21:19 msafwan New Issue
2013-03-10 21:33 msafwan Note Added: 0010029
2013-03-10 22:11 Kloot Note Added: 0010030
2013-03-11 00:12 msafwan Note Added: 0010031
2013-03-11 00:27 msafwan Note Edited: 0010031 View Revisions
2013-03-11 00:28 msafwan Note Edited: 0010031 View Revisions
2013-03-11 00:29 msafwan Note Edited: 0010031 View Revisions
2013-03-11 00:31 msafwan Note Edited: 0010031 View Revisions
2013-03-11 00:37 Kloot Changeset attached => spring develop 8c355964
2013-03-11 00:37 Kloot Assigned To => Kloot
2013-03-11 00:37 Kloot Status new => resolved
2013-03-11 00:37 Kloot Resolution open => fixed
+Issue History