c++ - 车辆和箱子碰撞之间的重叠不起作用ue4
问题描述
void ARasenmaeher::OnBeginOverlap(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
if (OtherActor->ActorHasTag("BoxCollision"))
{
UE_LOG(LogTemp, Warning, TEXT("Overlap"));
IsOverlapping = true;
while (IsOverlapping == true)
{
AngryLevel += 10;
}
}
}
盒子碰撞设置为overlapalldynamic,车辆设置为“Vehicle”,我怎样才能让重叠事件起作用?
解决方案
推荐阅读
- javascript - Threejs 天空盒超出范围
- python - python数据框的列(从csv文件导入)与python关键字冲突,如何克服这种情况
- jquery - jquery 函数在单击按钮上不起作用?
- c++ - C++ 成员函数
- ios - 初始化程序中的错误“在初始化之前使用了常量‘self.apiKey’”
- python - Pandas DataFrame - 添加包含“先前”行的条件总和的列
- javascript - 访问局部变量的 JavaScript 匿名函数
- android - Unity 无法在 Mac 上导出 Android 项目
- javascript - JS - 为什么 await 在课堂上不起作用
- c# - 任何可用插件都不支持身份验证方法“caching_sha2_password”