Ai is facing my player no matter how high I am. That’s all ok how ever his facing me with his whole body. So from above he’s facing my player lying on his back. Like I said If I’m above his body will still full face me just like he would face me on the eye to eye on the ground. I tried to constrain his rotation in the X but constrain has no effect. He’s whole body is rotated towards me and not only his upper body. Actually I don’t need he upper body to rotate at all. I just want him to stay leveled with the ground. Really need help here.
Caution before you answer. Extreme noob here!!
a hint: when asking a question give a small summary of your problem and then a complete version of it, you just gave me the summary, try uploading screenshots, you should add a ss of how it looks, and ss of the code, otherwise i can just make suppositions of what’s happening, and this way it may take time to solve your problem
my guess: you need to put some sort of “Navigation mesh”(not sure if this is the actual name) on your level to the AI works right? maybe it is confusing walls with floor, this should be avoided if you be more restrict if your “Navigation mesh”. but this is a random guess.
what function/method are you using to make the AI follow the player?
It would help greatly if you showed what system you are using to rotate your AI actor, but ultimately what you could do to fix this take only the Yaw value for the Actor’s rotation. For example, something like
FRotator NewRotation = FRotator(0, (Player->GetActorLocation() - Bot->GetActorLocation()).Rotation().Yaw, 0);
Bot->SetActorRotation(NewRotation);
should be sufficient to get the AI to turn towards your location without looking up/down.
Edit: Looking at the first blueprint picture (with the FacePlayer event), drag the Return value from Find Look At Rotation and create a “Break Rot” node. Then, take the Yaw value from the Break Rot node and make a “Make Rot” node. The values for pitch and roll should both be zero, and the yaw should be the yaw value from the Break Rot node. Then drag the Make Rot return value into the SetActorRotation node. My node names may be inaccurate, but hopefully it gets the point across. If not I can make a demonstration of it tomorrow for you.
I edited my answer with a response to the blueprints, let me know if you still need help afterwards.
Thanks for answer guys. So here are my blue prints inside my AI. Method for AI is AI move to. To the guy below I did hear about some Yaw settings before. I will try to give that a try as well. So again to recap AI will face me with his whole body in every direction. So all the animation of the AI will play on the angle if I’m not on the ground level that is. On the ground level animation montages play correctly. I just need to find a way to constrain X axes some how. I think Yaw might be the thing.
Blue Prints. Thank’s guys!!
Many thank’s for reply guys. I’m glad that some one can help these noob out. I will try the suggested above tonight and come back with results. Thanks again!!
And Thanks for offering to help me out with blue print. Probably I will screw something up and ask you for help again tomorrow. I am clairvoyant that way. I will play with it tonight!. I will let you know if it work tomorrow. Thank you guys!!
Atonement. Thanks!!! WORKS!!! Keep up the good work!!! Here is the working blue print. AI now stay feet on the ground. What he is doing is throwing fire balls. So now only the fire ball flys towards me if I’m above AI and he’s body horizontal with the ground. Huge thanks to you and the guys. Thank you for quick reply!!!
Also can we mark these us Resolved. Thank’s!
Glad to help! Don’t forget to accept the answer so that the ticket resolves
THANKS GUYS RESOLVED!!!