Here I’m trying to set the foot angle to follow the slope angle, and it does only work when the actor forward vector (Y) is -1 or 1.
What can I do to fix the angle of the foot in different character rotations?
Here I’m trying to set the foot angle to follow the slope angle, and it does only work when the actor forward vector (Y) is -1 or 1.
What can I do to fix the angle of the foot in different character rotations?
In this tutorial, the character rotation does not follow the camera rotation, and it is fixed. I’m trying to do it for an FPS game.
You can apply it yourself
I don’t think we’re on the same page. In the video you provided in the original post, you showcased the issue on a third person character, which I assume is the player character in your game. And IK feet are usually not a part of first person games. Could you clarify what’s going on?
While not being sure, I feel like you also want to be able to have this feature in the first person mode. There shouldn’t be any difference in the IK feet logic, but here’s a tutorial on switching between third person and first person:
Hope this helps!
That was just another view so I can see how the feet are on the ground, but otherwise the goal is to do it for an FPS game. As you can see, the character always faces the camera. Following that tutorial would be like giving up on what I’m trying to do and what I’ve set up already.
In the foot placement part of that video, can you say where 110 and -45 come from?
You should be able to implement the same thing to your first person character as well. If you tried that and didn’t work, it might be due to those values that you were asking about, which determines how much the IK feet should be affected. You can adjust those values to fit your specific model
Hey @dabbbbbbbb5656, it’s been a while since we last heard from you! Were you able to implement IK feet properly? Do you have any updates?
When did I say my problem was implementing IK feet? It’s just the foot rotation only works for one direction and not the other ones due to me using the “Use Controller Desired Rotation.”
Please clarify the situation if you think there’s a confusion. It seems like your objective is to align the feet with the ground based on this explanation:
Have you tried implementing IK feet by checking out the tutorial I provided? The showcased implementation is different from the blueprint code you shared in your original post. To make sure that we’re on the same page, could you show us what happens when you enable the use controller desired rotation setting for your character after correctly implementing the IK feet logic in the tutorial?
I’m telling you that I won’t blindly follow a tutorial that is probably not made for people who want to use “Use Controller Desired Rotation.” Have you tried the tutorial you provided while the “Use Controller Desired Rotation” was on? If so, and it worked, I can blindly follow that tutorial, but otherwise I can’t.
I personally wouldn’t do anything blindly. I just inspected the code and logically interpreted that the rotation of the character wouldn’t affect the result. But a test would be appreciated. So that’s the next step you should take in order to reach your goal.
I know it might seem so troublesome, it’s only natural for you to hesitate starting a new task while thinking it might not be useful at all! Fortunately, I did it for you
Here:
Umm what, the post showed up as edited the moment I posted it
Even though I added the comment above the second after I’ve sent my post, it became the second edit. This one’s for testing purposes, to see if this will show up as the third edit (even though this is a very quick edit as well) Ok it didn’t. Interesting
Okay I realized what was going on. I actually had a quote in the first version of my post but when I posted it something went wrong and the quote got removed automatically, and that showed up as an edit, and not just a normal edit, the kind where we delete posts, that’s why my first comment here showed up as the second edit and it got back to normal since then. Weird bug.
Can you please make a slope steeper than that one (like the slope in my image) and rotate in place so I can see the foot? (while the walls aren’t blocking the view)
Here:
Just start implementing it already rather than making sure that it will result in the way you want beforehand You’re not saving time this way.
I’ve made some progress.
Here I’m using the Make Rotation from Axes node and plugging the normal into the Forward, and then I’m trying to make the x of that rotation relative to the socket, and I plug that result into the Draw Debug Coordinate System to see what happens.
What happens is that it works fine only on one of the slopes and not with the other two; when the character steps on those slopes, the axis is no more facing the direction I want, and when this change happens, I see the X (Roll) has not changed (some kind of a flip happens from the Y or Z without the X changing). Does anybody know why this happens, and what can I do to fix it?
What’s the purpose here?
Wasn’t the showcase I provided the final result you were looking for? If so, then what are you doing? If not, please clarify what you wanna make different.
The video you provided, which I’d already seen before posting this question, does not interest me, and my question is clear about my code.
The video works for the mannequin, not my custom character. There is no explanation of where certain numbers come from, so it’s useless to me.
Though it’s what you’re trying to achieve, right?
I was able to make it work with my custom model. Again, here’s the explanation
Those numbers aren’t taken straight out of certain proportions of the model. They’re determined with that taken into account, but they’re later played with until the result is satisfactory.
I understand that you’re looking for an exact answer, but noone can tell what values you should use for your specific model. Those are the only parts of the tutorial that you need to adjust yourself, and then you’ll be good to go
I was able to fix my problem with two different ways that I saw them in different videos explaining how to make the character align with the angle of the ground, but in my case I just needed it for the foot rotation.
First way:
Second way:
Both of these ways are giving me the same result, but I find the first way to be understandable for myself, and in the second way, I don’t understand all that multiplication by -1 and swapping the pitch and roll while making the rotator.