Download

how to make player mesh always facing center of level

Hello,

I’m playing around with some VR stuff and I have a player that floats around a level (he is moved thru physics by being hit by randomly falling actors) while sitting on the floor. He has a body with his knees, hands and feet showing when you look down. While he’s floating around on the floor I want his body always facing the center of the small level (knees, feet, hands pointed toward the center). I’ve tried a bunch of different things using ‘find look at rotation’ using both the actor reference and just the mesh. I tried just ‘find look at rotation’ plugged into set actor rotation and i tried it with rInterp to…I’ve googled all around but it seems no one has this exact question anywhere. Below is an example I tried…I feel like that should work! But it totally does not and I don’t know why. The mesh just rotates all around as if I didn’t do anything. Any help/guidance is much appreciated! This seems super simple…I must just be missing something.

Thanks!

c91e0867d8d1e19313fffb6abe72503a2742fb76.jpeg

Where is this BP? Level, actor? Maybe try adding a target actor in the dead center where you want it. Then in BP add the target actor, drag a line and get location of the target, and add it to the look target. Then you may need to add world location and forward vector of mesh together. I did something similar for my bots.

Maybe this video can help you: Unreal Engine 4 Tutorial - Actor look/face at player - YouTube

You must add a target actor in the center, as DJ-INSERT said before…

Is your mesh the character mesh? If so I believe you can’t modify it at runtime like that, try doing this to the actor itself.

Cool thanks so much for the help. Got it. I made a blank actor BP and put it in the center of the level.
Then in my first person character BP in event start up I called up that blank actor class and made it a variable.
Then in the event tick I got it’s location and added that to the find look at rotation…

I think what I wasn’t understanding was that for the find look at rotation I needed to get the get actor location of an actual actor…I couldn’t just make a vector like I did above and plug it in. Anyone know why that is? What other info is it getting from that blank actor BP I put in the center of the level that it wasn’t getting from the vector coordinates?
Thanks again!