Possible Bug: flying with z axis constraint

I’m currently having my character switch from walking to flying to simulate a quick flying like “sprint”. when the character is flying and bumps into anything, it knocks the character up in the z axis off the plane the character was flying over. I tried constraining the character to the floor a few different ways in character movement and was wondering if this was possible with flying or if it wasn’t.

To give a little more information: My project is a top down 3d game type but is paper2d and I’m simulating an isometric experience haha.

So the character is currently only moving in the x and y planes and not in the z plane. I want to keep it this way even when I move to flying.

Bumping because no resolution has been found.

Hello,

  • When you say you have attempted to constrain your character, how did you attempt to do so?
  • Could you provide some screenshots of the relevant blueprints please?
  • Do you have any steps that we can follow to reproduce this issue in a clean project?

Thank you.

this is how I attempted to constrain the character. both here and in c++ with the same options.

The only thing I can recommend for re-production is to copy what I’m doing.

Create a top down 3d template. toss in some pretty big sprites that act as obstacles. lay them down flat on the floor so that they face the sky. for the main character, setup wasd controls.

make sure collision is pretty thick on those sprites.make the capsule 30 half height 30 radius.

then set up a sprint like button like how I’m doing it, and your flying speed to 1500. If it helps, set up a sprite for your character and lay it down flat (as it’s collision may be the cause of why it gets launched up .) and correct the camera if you so need it, haha.

I have the blueprint disconnected because for now because I’m trying to tackle other things such as a weapon system and attacking and I’ll get back to it when I can solve the issue kinda thing.

Thank you for providing the information. I will attempt to reproduce your issue.

In the meantime, have you looked into using the Constrain to Plane option located in the Character Movement Component details panel? This may be what you are looking for.

Yes, I get odd reactions from the game when I do this. for instance if I constrain Z , my character can only move in diagonal. if I restrict movement in just the X, I can move just fine, if I restrict movement in the Y I can only move in the X( Yes this is my life right now.)

Have you tried going into the Character Blueprint, and under the Physics section, clicking the arrow to expand the Constraint dropdown and locking the Z position?

Here is a screenshot to show what I am talking about, just check the Z box in the screenshot below:

79906-lockposition.png

yeah I have it set to “allow movement in 2d” or XY where it says Mode. :’(

Would it be possible for you to provide a zipped up version of your project through Dropbox? I’d like to take a look at your setup. You can PM it to me through the forums: https://forums.unrealengine.com/member.php?160394-Sean-Flint

It’s gotten real, Alright I’ll pack it up for you but I’ll have to comment some code and some blueprint. I’ll probably have a write a little about how we tackled a few things as well. also nothing has been optimized. Now that the warnings are out of the way, give me some time to tidy up a bit and I’ll get it to you. Thanks again for taking the time to look into ma issues.

Thank you. Please reply to this thread once you have sent the project so I know to take a look.

Hello,

I am marking this topic as resolved for tracking purposes, as we have not heard from you in a few days. If this issue persists, feel free to respond to this thread. For any new issues, please create a new Answerhub topic.

If you provide the test project, please go ahead and respond to this thread to re-open it for investigation.

Have a great day