Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Limiting random motion.
Old
ScottDrew
Guest
 
Status:
Posts: n/a
Default Limiting random motion. - 05-05-2008, 09:30 PM

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.
   
Reply With Quote
Old
groucho
Guest
 
Status:
Posts: n/a
Default 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.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



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