UE4从菜鸟到高手13:Unreal Engine碰撞讲解(上)

01 前提

Sphere、Cube、Floor都是StaticMeshActor类型
13 Unreal Engine碰撞讲解(上)

02 力与碰撞

02 01 Simulate Physics

现阶段直观觉得Simulate Physics是加重力的,对WorldStatic类型打勾“忽略”或“重叠”的话。
13 Unreal Engine碰撞讲解(上)
Sphere、Cube、Floor都会往下掉
13 Unreal Engine碰撞讲解(上)

02 02 不同类型的reget、overlap、block

只有Sphere开启Simulate Physics,并且穿Cube(WorldStatic类型),不穿Floor(默认WorldDynamic类型)
13 Unreal Engine碰撞讲解(上)
13 Unreal Engine碰撞讲解(上)

03 OnActorHit方法(谁打了我)

  1. 在“02 02 不同类型的reget、overlap、block”的基础上,Sphere开启“Simulation Generates Hit”,并且对Cube和Floor两种类型都会变“硬”(block)。
    13 Unreal Engine碰撞讲解(上)
  2. 碰了Sphere的对象“Other Actor”的名字会被打印

13 Unreal Engine碰撞讲解(上)

  1. Cube碰了Sphere,Cube被打印

13 Unreal Engine碰撞讲解(上)

04 总结

13 Unreal Engine碰撞讲解(上)

相关文章:

  • 2021-08-31
  • 2021-11-17
  • 2021-08-31
  • 2022-12-23
  • 2021-09-24
  • 2021-04-25
猜你喜欢
  • 2021-04-20
  • 2021-11-28
  • 2021-04-26
  • 2021-08-12
  • 2021-07-18
  • 2022-12-23
  • 2021-05-03
相关资源
相似解决方案