Does Outline Render not work on Mobile? I can't get it to work..

I have made a simple little fun game that I am preparing to Publish on Android built from a mobile thirdperson template and I’m almost done.Basically there’s a lot of objects on the ground and I want to indicate which one the player is looking at to decide to pick up. I have touch controls and a crosshair set in the middle of the screen if that explains anything.

For the last 3 days I have been going crazy over trying to figure out a way to indicate which object the player is looking at to pick up so I thought an outline would be a good idea however after following like 5 different tutorials I cannot seem to get it to work to save my life…

I have a linetrace in there and I have tried everything I can think of but still no luck yet. I had some previous code in there for different attempts but so far nothing has worked yet so I deleted it. I am thinking maybe I can find a way to run it off of the pickup code since it already is looking for a present object to pickup with the linetrace in there. Also, yes I enabled the outline stencil, theres a post process volume, and I added the outline material to it. I reverted the github commit because so far I haven’t got it to work yet and thought maybe I am not doing something right…

Can someone help guide me here? What am I doing wrong? Any ideas or other suggestions?

for some post process mobile stuff you have to enable mobile hdr in the project settings.
If that doesn’t solve the issue, could you clarify what is and isn’t working. Is the picking up the object working and just the outline part not working. if so does the outline effect work outside of a blueprint if you just manually turn the a mesh to the outline stencil value.

Thanks for the link, i’ll take a look at that this afternoon.

Okay thank you, I appreciate the info about that, I had no idea.

And just to clarify, it’s just the Object Outline Material that I couldn’t seem to get to work.

The pickup/drop object works fine, that part I already figured out from watching a youtube video to learn how to do that.

I’m just basically trying to find a way to let the player’s linetrace hit the box they’re picking up out of the pile and highlight it to indicate which one they’re picking up since there’s a lot of objects that are being spawned into the same area. It’s probably not really necessary but I thought it would be nice to have.

I’m not sure I understand what is meant by “if so does the outline effect work outside of a blueprint if you just manually turn the a mesh to the outline stencil value.” as I’m more of a visual learner but I will take another look at that as well this afternoon. I just know no matter what I tried I couldn’t get it to work after following several different tutorials so my guess is I probably don’t have something right.

I kinda wonder if maybe it has something to do with the fact that I have a bp_MasterBox and 3 bp_ChildBoxes but the MasterBox I disabled from being placed into the world, only the children can be spawned since those contain the 3 Meshes but that doesn’t seem like a logical cause so I’m not yet sure what else it could be other than the mobile post process thing you guys pointed out.

@IndieGameCove
@BladeMaster

Well, after trying this again I noticed that it works if I set the outline manually via Object > Custom Depth Render Pass on the mesh itself by dragging it out in the world which I was doing to test if the outline would work or not.

However if I try to toggle it from one object to the other then nothing happens and even worse I get a branch error on my OutlineTrace Function to the custom render depth pass. I’m gonna try it a different way but running out of ideas at this point so I may just scrap it until I can figure it out…

This is the video that seems to be the closest to what I want except I want it based on the camera view because I’m using touch controls even though I tried it that way and it still was the same problem.

Additionally, here’s some of how I currently have it somewhat similar except I was using my first person camera and existing linetrace which I think might work but no luck yet. My guess is there’s something outdated in those tutorials because ive been mucking around with this for the last day or two again. Also just to note, I’m using mobile joystick to move, swipe to look around, and a button to pickup/drop the object just to clarify.

the error is probably because the ‘HitResult’ struct is not valid as it hasn’t been set to anything and you’re trying to reference it. After the first click it would become valid because you’re setting it at the end of the first click.

you’re also checking if the old and new actors are the same both inside and outside the ‘startoutlinetracing’ function, so that’s redundant but shouldn’t break anything.
I’d insert print strings at various points in the code looking for anything unexpected. for example, you can confirm if you’re hitting the expected components by printing the name of the actor/components from the hit result.

I got the outline working, thanks guys

Please Share how so Others find the solution

1 Like