can anyone explaing why this code is not working? the trace just go through the object?
Hello,
Could you provide a screenshot of the collision settings for your bp_big_door_key?
No problem. Have you tried checking the Trace Complex boolean that is located on the Line Trace by Channel node? Depending on how you have your key mesh set up, this may be necessary. Go ahead and give that a shot and see if that helps.
still nothing man! …
Are you sure you want to use CameraManager for location and forward vector? If you want to get player location and rotation you should probably use GetPlayerPawn. Depending on how your Pawn is set up you might need to use GetPlayerController > GetControlRotation > forward vector.
Edit:
Just noticed you have it inside Character class. In this case you can even call GetActorLocation directly.
with that method the trace does not come from the camera but in the center of the player, but it did not work either, do you mean default pawn class? yes I have set my player through there
Ok. Is it detecting the key with the simple print out? If so, are you sure the key in your level is, in fact, the Blueprint and not just a Static Mesh dragged from Content Browser?
wow! didn’t even realise that I had renamed it, but now I have learned…





