在使用c++添加skeletal mesh component 时,总也触发不了hit事件,经过一番折腾,发现是generated hit event 没开
在construct里边设置属性压根没用,最后挪到了begin play 里边设置 才行
ue4里 generated hit event 是通过SetNotifyRigidBodyCollision来设置的,坑爹
mFlightMesh->SetNotifyRigidBodyCollision(true);
mFlightMesh->BodyInstance.SetInstanceNotifyRBCollision(true);
mFlightMesh->OnComponentCollisionSettingsChanged();
千万不能少了OnComponentCollisionSettingsChanged , 否则没用