In a project I'm currently working on, I want objects to be able to move from point a to point b. The MoveIt object is very good for this, but it doesnt support any acceleration or decelleration. I want the object start at point a, accelerate to its top speed, then it would decellerate to a stop at point b. (The object comes to rest at point b)
How can I do this without complicating things too much?
Assault Andy Administrator
I make other people create vaporware
13th May, 2005 at 20:07:55 -
As for normal acceleration, create a counter and have some code like this:
Repeat while space is pressed - Add to counter 1
Repeat while space is not pressed - Subtract 1 from counter
+Counter > 1
Well, I want this movement more for enemies..
Ill have a look over this example nonetheless...
Whoa. It seems the MoveIt! extension has a small problem. In my situation, I have 9 possible nodes an object can move it. A node is picked at random, and MoveIt moves to the node. I discovered that if the object picked at random is the one that the object is already at, then the application has an illegal operation and crashes.
It seems when trying to move something with MoveIt to a spot that its already at, destroys the app. =/
I havent necessarily done any of the coding for that part yet, I only have an idea of how I want it to be. When an enemy moves from point a to point b, I just dont want it to travel a constant speed. I want to accelerate and decelerate. Thats pretty much it.
Ignore the whole thing about MoveIt crashing in my previous post, thats not a part of what I want to do.