- 最后登录
- 2024-6-3
- 注册时间
- 2009-10-16
- 阅读权限
- 100
- 积分
- 18803
- 纳金币
- 17488
- 精华
- 1
|
Summary
Causes the parent object to leave a trail of 'ghosts' behind it as it moves.
Category
Latest Behaviors
Author
Gavin Kistner
Difficulty
(Reference)
Time to Complete
5 Minutes
Downloads
Click Here
to download the associated files.
(This document covers version 1.5.2 of the 'Ghost Trails' behavior, current as of 2005-Aug-04)
Description
Attach this behavior to an object to cause
ghosts
to follow it as it moves around the screen. Each ghost is a copy of the object, with (by default) decreasing opacity and scale.
The
Number of Ghosts
property controls how many ghosts are created and moved around.
Each ghost matches the position, rotation, and scale of its predecessor. (But see the
Ghost Scale
property below.)
If
Hide When Atop?
is checked, the ghosts will disappear (opacity 0) when they are sitting exactly on top of the parent object. (This prevents ‘blurry’ results when the ghosts catch up to the object.)
The
Start Opacity
and
End Opacity
properties control the opacity of the ghosts; the first ghost to follow the parent will have the opacity of
Start Opacity
, and the last ghost will have the
End Opacity
. These opacity values are scaled by the opacity of the parent; if the parent has an opacity of 80 and the
Start Opacity
is set to 50, the first ghost will have an effective opacity of 40.
The
Ghost Scale
property affects the scale of each ghost. A value of 1 causes all ghosts to be the same size as the parent object. A value of 0.9 means that the first ghost will be 90% of the parent’s size, the second ghost will be 81% (90% of the size of the first ghost), the third will be 73%, the fourth 66%, and so on. Values greater than 1 cause ghosts to become increasingly larger than their parent (an interesting effect).
The
Frames to Skip
property delays each ghost from following its predecessor. With the default value of 0, the first ghost will follow the parent immediately. With a value of 10, the first ghost will be placed wherever the parent was 11 frames ago (skipping 10 frames), the second ghost will wait 10 frames before moving to where the first ghost was, and so on.
This effect works particularly well when used in conjunction with the Draggable or Follow Mouse behaviors, but the object does not need to be controlled by the user to leave trails.
Basic Properties
Number of Ghosts
The number of ghost objects to follow around the original.
Start Immediately?
Start showing Ghost Trails immediately, or wait for the Start action to be called?
Advanced Properties
Hide When Atop?
Hide the ghost objects if they are directly on top of the parent?
Start Opacity
Opacity of the first (closest) trailing object.
End Opacity
Opacity of the last (farthest) trailing object.
Ghost Scale
The amount to reduce/expand the size of each ghost by.
Frames to Skip
The number of frames to skip between each ghost.
Actions
Start
Start showing ghost trails.
Stop
Stop showing ghost trails.
Toggle
If ghost trails are showing, stop showing them; otherwise, turn them on.
Events
Started
Fires when ghost trails are turned on.
Stopped
Fires when ghost trails are turned off.
Demonstration
View Demonstration Project
Download Project File
|
|