12 第1页 | 共2 页下一页
返回列表 发新帖
查看: 3618|回复: 10
打印 上一主题 下一主题

[Anark] Follow Mouse (Interactive Behavior)

[复制链接]
Asen    

867

主题

0

听众

1万

积分

外协人员

Rank: 7Rank: 7Rank: 7

纳金币
17488
精华
1
跳转到指定楼层
楼主
发表于 2011-10-21 08:15:00 |只看该作者 |倒序浏览






               Follow Mouse (Interactive Behavior)
              









           Summary
         

           Causes the object to follow the mouse around the screen.
         





               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.0.1 of the 'Follow Mouse' behavior, current as of 2005-Feb-11)
           

            Description
           


             The
            
              When to Follow
            
             property controls when the object follows the mouse. By default, the object always follows the mouse, but you can have it only occur when the mouse is down (much like the Draggable behavior), when a certain key is down, or a variety of other events. If you use the last option, “
            
              (Action Controlled)
            
             ”, the object will only start following the mouse when the Start Following action is invoked on this behavior.
            

             By default, the object reacts instantly to changes in the mouse position. The various Advanced Properties described below allow you to control how the object follows the mouse.
            

             The
            
              Follow Delay
            
             property specifies how many frames the object should wait before following the mouse. For example, a value of ‘10’ means that the object will try to move to where the mouse was 10 frames ago, while the default value of 0 causes it to always move to where the mouse is right now.
            

             The
            
              Screen Offset
            
             property specifies a fixed offset (in pixels) from the mouse position that the object should move towards. For example, a value of “50, -20, 0” will cause the object to move to a spot 50 pixels to the right and 20 pixels below where the cursor is. (The z value is always ignored.)
            

             The
            
              Spring Tension
            
             property controls how hard the object is pulled to the desired spot. A value of 100 causes it to instantly snap to the desired spot, while a value of 50 causes it to move 50% of the distance each frame. Lower values give the object a smoother reaction to changes in the mouse position.
            

             Finally, the
            
              Holdoff Distance
            
             is a fixed distance (in the object space) that the object should stay away from the mouse. This is similar to the
            
              Screen Offset
            
             , but
            

             a) it is specified in world units, not pixels, and
            

             b) it specifies only distance, not location.
            

             Think of
            
              Holdoff Distance
            
             as a rigid pole attached between the end position and the object, which can pivot on both ends. The object will chase the mouse but stop before catching it, and if the mouse moves toward the object, it will push off to ensure it stays away from the mouse.
            

             All properties can be used in any combination. (Although some combinations may produce ‘interesting’ effects.)
            


            Basic Properties
           



              When to Follow
            

              When is this behavior active?
            

              Trigger Key
            

              If 'When to Follow' is 'Key Down', the name of the key to watch for.
            

              Stop on Reverse?
            

              Stop following the mouse when the 'opposite' event occurs?
            



            Advanced Properties
           



              Follow Delay
            

              Number of frames behind the mouse to trail.
            

              Screen Offset
            

              Fixed X/Y offset from the mouse for the object move to.
            

              Spring Tension
            

              How strong is the 'spring' between the object and the mouse? (100 is a rigid attachment.)
            

              Holdoff Distance
            

              Distance away from the the mouse/offset to keep.
            



            Actions
           



              Start Following
            

              Start applying this behavior.
            

              Stop Following
            

              Stop applying this behavior.
            

              Toggle
            

              If the parent is following the mouse, stop it; otherwise, start it.
            



            Events
           



              Started
            

              Fires when the behavior is started.
            

              Stopped
            

              Fires when the behavior is stopped.
            



            Demonstration
           




              View Demonstration Project
            




              Download Project File
            



分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

沙发
发表于 2012-1-31 23:21:43 |只看该作者
快意吟诗句, 乐在得团圆。
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

板凳
发表于 2012-2-17 23:20:11 |只看该作者
加精、加亮滴铁子,尤其要多丁页丁页
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

地板
发表于 2012-2-18 23:19:27 |只看该作者
再次路过……
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

5#
发表于 2012-4-11 23:19:11 |只看该作者
好,真棒!!
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

6#
发表于 2012-4-24 23:31:05 |只看该作者
我无语!
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

7#
发表于 2012-5-16 23:23:47 |只看该作者
精典,学习了!
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

8#
发表于 2012-5-16 23:25:46 |只看该作者
再看一看,再顶楼主
回复

使用道具 举报

   

671

主题

1

听众

3247

积分

中级设计师

Rank: 5Rank: 5

纳金币
324742
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

9#
发表于 2012-6-14 23:21:18 |只看该作者
很有心,部分已收录自用,谢谢
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

10#
发表于 2012-6-21 23:26:38 |只看该作者
顶!学习了!阅!
回复

使用道具 举报

12 第1页 | 共2 页下一页
返回列表 发新帖
您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-8-1 05:47 , Processed in 0.067894 second(s), 29 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部