zoukankan      html  css  js  c++  java
  • spend tons of time to debug this asshole/ UE4 C++ event dispatch

    within the customer engine ver. 4.19 base, I try to do the array bucket to handle all the overlap collision and somehow to overlapend and begin is inversed, can not figure out why and finaly look at the source code "PrimitiveComponent.h" and figure out why.. because they fckign make the Overlap Delegate in the different shape!! FCK YOU EPIC.

    DECLARE_DYNAMIC_MULTICAST_DELEGATE_FiveParams( FComponentHitSignature, UPrimitiveComponent*, HitComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, FVector, NormalImpulse, const FHitResult&, Hit );
    /** Delegate for notification of start of overlap with a specific component */
    DECLARE_DYNAMIC_MULTICAST_DELEGATE_SixParams( FComponentBeginOverlapSignature, UPrimitiveComponent*, OverlappedComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, int32, OtherBodyIndex, bool, bFromSweep, const FHitResult &, SweepResult);
    /** Delegate for notification of end of overlap with a specific component */
    DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams( FComponentEndOverlapSignature, UPrimitiveComponent*, OverlappedComponent, AActor*, OtherActor, UPrimitiveComponent*, OtherComp, int32, OtherBodyIndex);

    the 3 above are hit, overlapbegin, overlapend. ..but somehow if you use the older one the overlapend still works

    好了不吐槽了,要解决的问题就是个碰撞的dispatch,但是4.19的格式跟之前的不一样,上面贴的是源码里面的,官方的是:

    void ALightSwitchCodeOnly::OnOverlapBegin(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);

    就是位置不一样,但是可以运行,但是碰撞检测不一样...以为见鬼了一开始
  • 相关阅读:
    ONVIFclient搜索设备获取rtsp解决开发笔记(精华文章)
    openldap---ldapsearch使用
    简单工厂模式
    编译和运行时,库在何处
    Linux 双网卡绑定技术
    统计某个字符个数,小数运算,小数加减乘除
    2cifang.com_2次方学习
    c/c++ extern “C”
    环境变量0831
    股票技巧
  • 原文地址:https://www.cnblogs.com/sunchuankai/p/11822983.html
Copyright © 2011-2022 走看看