Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Limiting random motion. (http://www.alice.org/community/showthread.php?t=1385)

ScottDrew 05-05-2008 09:30 PM

Limiting random motion.
 
I have an object, i want it to move randomly (2-dimensionally, no forward direction being used.) between four points, lets say x = 5, -5 & y = 3, -3

I want the object to randomly move to a position within these boundaries, any ideas? So far, i can get the first movement to be within the boundaries, but when the fighter moves, the boundaries follow it, so they are relative to the fighter.

groucho 05-06-2008 01:46 AM

Just use the "vectorMoveAbs" method Dick Baldwin has provided in one of his excellent tutorials. You'll find it easily by using a google search in alice.org.


All times are GMT -5. The time now is 07:47 AM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.