AActor incompatible with UPrimitiveComponent

This is an intellisense error. What is the actual error when you try to compile?

The program can compile, but it is definitely not doing as I desire. It is supposed to send the player back to the starting position when the player lands on the box, but the program does nothing.

There could be a lot of different reasons. Does the other actor component have collision query and generate overlap events enabled? Does it have a proper overlap response with this actor?

If any of these were the issue the program would not compile.

An error keeps popping up stating AActor is incompatible with UPrimitiveComponent, which is happening at the Generated_Body line. It must have something to do with my TriggerEnter function Please explain.

200266-picture3.png

This could be a lot of things, but the most obvious is, did you remember to #include “Boundary.generated.h” in Boundary.h?

Also, the name of the third argument of TriggerEnter changes between your declaration and definition. (OtherBodyIndex vs OtherBodyIndx). I wouldn’t expect this to cause trouble in normal C++, but you never know once UE4’s reflection and intellisense get involved, it may be confusing them.

UPrimitiveComponent* UPrim = Cast(GetOwner() → GetRootComponent());