- 最后登录
- 2024-6-3
- 注册时间
- 2009-10-16
- 阅读权限
- 100
- 积分
- 18803
  
- 纳金币
- 17488
- 精华
- 1
|
Stick to Screen (Miscellaneous Behavior)
Summary
Causes the object to stay in a specific spot on the window, even if the camera moves or the window is resized.
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 2.1.0 of the 'Stick to Screen' behavior, current as of 2005-Feb-16)
Description
This behavior is useful for positioning items along the borders of windows which are not a fixed size.
If you want the object to be on the exact edge of the screen, modify the pivot offset of the object so the origin is on the very side of the object, and then set the
X Position
or
Y Position
to 0 or 100.
0,0 is the top/left corner of the screen.
100,100 is the bottom/right corner.
By default, the advanced
Attach to Camera?
property is checked. With this property checked, the parent object is re-attached to the camera object as soon as the behavior starts. (This makes the position on the screen rock-solid if the camera is moving.)
If re-attaching the object causes problems in your presentation (for example, it will break object references that Relative Path instead of Absolute Path, and may change the apparent scale/rotation of the parent object), uncheck this property. The behavior will use slightly more computational power, and the object may shift slightly on screen (temporarily) if the camera moves…but the parent object will not be detached and re-attached.
Basic Properties
Affect X?
Modify the parent's left/right position?.
X Position
Percent across the screen that the object's pivot point will stick to.
Affect Y?
Modify the parent's up/down position?
Y Position
Percent down the screen that the object's pivot point will stick to.
Advanced Properties
Attach to Camera?
Move the parent to attach to the camera for rock-solid position?
Demonstration
![]()
View Demonstration Project
![]()
Download Project File
|
|