Announcement

Collapse
No announcement yet.

KActor可以出发Touch事件吗?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    KActor可以出发Touch事件吗?

    RT。把Touch里的几个属性都试了,但就是不能触发Touch。

    #2
    虽然我懒得去试……但是touch事件是在Actor类中被定义,所以KActer肯定可以触发touch 事件。

    我建议LZ可以声明一个新类 [你游戏名称缩写]KActor extends KActer
    然后在里面重载 Touch() 事件

    event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal)
    {
    WorldInfo.Game.Broadcast(self,"So, the touch event works.");
    }

    然后在地图里加入这个新类的实例,走过去碰碰试试看会不会有输出

    Comment


      #3
      参考这个帖子http://forums.epicgames.com/archive/.../t-930733.html
      我记得由于KActor用了刚体物理引擎,它的 Touch() 不会被触发。不过有另一个函数会在碰撞时触发,好像是event RigidBodyCollision

      Comment

      Working...
      X