Greetings! I am having some issues with utilizing a custom trace channel. I am basically creating a left mouse click navigation system, but I don’t want players to be able to activate it if clicking on certain objects. Pretty basic.
I set up a custom object channel and trace channel in the project settings called “PopCenter” and “PopCenterChannel.” I then appropriated the Vehicle Preset to block only these:
I then created a primitive object with a collision mesh. This object is being generated dynamically. I then set the Object Type of the Mesh to “PopCenter” during BeginPlay in Blueprints:
I then enable a LeftMouseClick event in Project Settings - > Input. After that, use Player Controller ->GetHitResultUnderCursorByChannel() to determine whether a left click with the mouse is hitting the primitive or not.
Basically, the left mouse click is intended to move a pawn with a spring camera attached around but only if the PopCenter primitive mesh isn’t hit with a trace.
Unfortunately, it doesn’t seem that the trace is being blocked. When I click on both the terrain or the primitive, “Testing !!” is printed so it doesn’t seem to be blocking.
I basically want clicking on the primitive to consume the mouse click.
Any help would be appreciated!