Re: camera theatrics
jon klein <[email protected]>
| Newsgroups | gmane.comp.breve |
|---|---|
| Message-ID | <[email protected]> |
On Jan 28, 2004, at 1:10 AM, sky wrote: > Am wondering if anyone has tried to do a "bullet cam" camera effect, > where the camera would pick an agent and follow close behind it as it > ran through the system. To follow an object around the simulation, you'll want to use the controller's "watch" method (part of the Control class). You can move the camera behind the object by using the method "offset-camera". Since you always want to be "behind" the object, one thing to try is to set the camera offset based on the object's current velocity. Here's how it might look: v = (agent get-velocity). # get the current velocity. v /= | v |. # normalize the vector to length 1.0. self offset-camera by -v. # move the camera position to 1 unit # behind the object. > I am also interested in a camera setting that would zoom to different > "events" such as a specific type of collision. There are no built-in methods to handle this type of thing, so you'll have to implement it yourself. - jon klein _______________________________________________ breve mailing list [email protected] http://www.spiderland.org/mailman/listinfo/breve