HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Moving a Ball

06-01-2004, 12:18 AM#1
thearog
hey guys you know those soccer maps or baseball maps that when a unit attacks/touches a rock or something it actually moves. how do i do that, i think it is some physics or whatever, so does anyone know how i add physics/movement to the ball. thanks
06-01-2004, 01:58 AM#2
Kaluo
Quote:
Originally Posted by thearog
hey guys you know those soccer maps or baseball maps that when a unit attacks/touches a rock or something it actually moves. how do i do that, i think it is some physics or whatever, so does anyone know how i add physics/movement to the ball. thanks

There is no 'physics' programmed into any ball.... Unless you mean something simple like making the ball a neutral unit that doesnt attack, hence runs from attackers in the opposite direction there are a number of things you can do. The above looks the nicest but can be buggy at times. You can always make a trigger for when the ball is attacked, move it to point with polar offset - position of ball offset by 100 pixels towards unit facing angle - the unit attacking the ball. That will make the ball teleport but you could do the same only ordering it to move. Many Many ways to do this, if none work be more specific
06-01-2004, 02:20 AM#3
thearog
ya except someone for a water polo they were working on was telling me all this stuff they did - the used inertia (newton's first law - object in motion tend to stay in motion unless an unbalanced force is acted upon it). they also used parabolas which are like half an oval which could grow in stretches on the x or y plane
06-03-2004, 07:45 AM#4
Deathperception
Thats just overcomplicating things making the ball run from the unit makes more sense. While all those physics and coordinates make it more precise can't beat simplicity.