Custom door accessed none error and invisible in viewport but not in game

I get “Accessed None trying to read property of CallFunc_BreakHitResult_HitActor” Node: Branch Graph" even with a branch off the line trace node for my door blueprint. When you click on the magnifying glass on the error message the rightmost branch shows up in the BP_ThirdPersonCharacter blueprint event graph. This error occurs from when my character is out of range from the door and presses the key to open doors. Also my door is invisible in the viewport but visible in game even with Include Component in HLOD set to false and true in the blueprint. Not sure how to make these errors go away. Here is a picture of the code for my door Imgur: The magic of the Internet.

Connect here

image

I changed it while leaving everything else the same and unfortunately still get the same exact error when pressing the open door key and not nearby to a door.

Which node do you get taken to when you click on the error?

Double clicking the Branch part of the error it highlights the branch located just left of Cast to BP_Door or the rightmost branch.

Very odd. What do you get if you use a print string here

After placing a text string and pressing the key away from a door no text appears. Not sure if I set it up right.

Have you got ‘show stats’ enabled?

image

Yes it is enabled.

Absolutely no idea, sorry.

So you’re still getting the error, but no message top left?

Oh, when I move in close proximity to certain items it now shows in the string “Name of Static Mesh” that the line trace is hitting. So if I’m looking at the door it says BP_Door when I press the open door key etc if I am farther than the line trace nothing shows up when pressing that key.

Ok!

So it is a door, presumably with the tag ‘door’ and casts to a door?

The BP_Door is a blueprint and not a static mesh. Well the blueprint consists of two static meshes one of a door and one of a door frame. BP_Door (Self) has the tag “Door”. The BP_Door blueprint is just dropped into the level and functions as expected except when away from the door pressing the open door key results in the previous error.

Apologies. This should work.

The BP_Door instances which ive dropped into the level already have their tag set to “Door”. In the Third Person Character BP the “actor has tag” node references Door in it.

1 Like

I don’t understand why you’re getting the error.

Perhaps another node is missing where the final rightmost branch says “False” or “Cast Failed” from the Cast to BP_Door node is needing some other node attached to satisfy the error.

No it’s all there.

Ah. You’re doing this trace from inside the player? Have you tinkered with the player character at all?

Besides adding the T key open door functionality, and the E key functionality to enter and exit a vehicle no changes to the default unreal third person blueprint.