Custom ball movement
Author: | David Evans
|
Submitted: | 27th October, 2002
|
Views: | 4727
| Rated: |
|
|
Ok - this code isn't very usefull but I've put it up just in case you want to know.
To make a ball movement where an object speeds towards a point then slows down as it gets closer this is what you do:
Code:
Always: object value A = x pos of destination - x pos of object / (Time in tenths of a second)
Always: object value B = y pos of destination - y pos of object / (Time in tenths of a second)
Always: object x pos = object x pos + object value A
Always: object y pos = object y pos + object value B
note: Time in tenths of a second is set to the time it should take the object to get from point A to B.
That's it!
|
No comments have been posted for this article.
|
|