Re: animate objects along paths defined by shapes.
jon klein <[email protected]> Mon, 23 May 2005 10:26:05 -0400
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <[email protected]> |
On May 18, 2005, at 2:33 PM, Samir Patel wrote:
> I am looking for a way to animate different shapes (small rectangle,
> person image) along predefined paths (for eaxample, polyline, ellipse,
> circle) travelling at random speed.
I would normally do this by moving the agent at each timestep to a
location
determined by a function of the simulation time. So for a circle,
for example,
I would get the current simulation time, and then set the location of
the agent
using the sine and cosine of that value. This example moves the
agent in a
circle of radius 5:
time = (controller get-time).
self move to 5 * (sin(time), 0, cos(time)).
Other paths can be made similarly.
- jon klein
_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve