So I am new to the AI concept, and I really wanted some help implementing rotating movement. The AI works fine, except the pawn, which is a cube (The AI pawn, and all the characters for that matter, are rolling cubes) can wander when I use the floating pawn movement, but when I use a rotating movement and change some settings on which axis it should rotate, it’s floating. This is obviously due to the fact that physics is not enabled. However, when I do enable it, it is not able to rotate. I have no idea how to use AI with physics actors.
Here’s another issue I have: PHYSICS MATERIALS. Friction just does not work. I tried applying a physics mat to a cube, and it still had no friction. Okay, this is a bit complicated to explain. When you picture a rolling cube, you can guess which direction it would move in. Except, in UE4, a rolling cube rolls in the opposite direction. You may think that it’s a simple fix, as all you would need to do is change the 90 degrees to -90 degrees, but watching a cube roll in the opposite direction that it would be most logical to move in is really hard on my eyes. I know exactly why it’s turning in the direction that it does, so I decided to add friction so that it didn’t move in the opposite direction. For reference, create a cube actor, put physics enabled, add a rotating movement component, and watch what happens. I literally put friction to 1000, but it still has no effect on the cube.
I coded the movement myself using blueprints, and I added strafing left and right. Other than the fact that the cubes look like they should be rotating the opposite way that they are, strafing worked fine. What didn’t was forward and backward movement. The cube would fall down, rattle, begin rotation, but in the middle of it, just when it’s about to move forward, it falls back down, or just not work. I don’t get how it’s possible how strafing works and forward and backward movement doesn’t.
Also, can someone tell me how to make my jump script only allow you to jump again when the cube character is back on the ground without having to actually add any reference to the actual cube I used for the floor? What I mean by that is that I want to be able to put a random object and have my cube be able to detect it as the floor beneath it, rather than actually making a blueprint or variable for the floor to let the cube know what is floor and what isn’t.
I was struggling to make an apex destruction destructible mesh the static mesh for the cube so that the character would be breakable. I did a few tests, and the closest I got was the destructible cube floating in the air, fractured, completely disconnected from the character pawn. It would be nice to actually have that working.
I’ll add some badly drawn example pictures.