Lock 3D physics on a 2d Axis Issue

Hello everyone,
I am having this problem Project: Paper2D - C++ - Unreal Engine Forums.
You can scroll down (almost at the end) to see pictures and a description.
I just created this project for testing purposes so you can see it for yourselves.
Dropbox - Error
Just push the crate to the left and as soon as it lands continue pushing it to the left until the end of the level and you will see that the crate is moving (slightly)in the Y axis .
In my case is more severe than here but this will give a good idea of what is going on.
Thank you!

I want to post a short video with my problem.As you can clearly see although the crate is at Y=(0) and the trees are at Y=(-0.1) when i move it around it moves in the Y axis although i have it locked.
Dropbox - Error (please download and watch.Preview in dropbox is horrible )
And since i am here could someone help me with making the crate move smoothly without all this friction and rotation?I know almost nothing on how to make a sprite move around with physics interactions to “ON”

Has anyone from the Unreal stuff checked this out yet?

Hey Roccinio,

I followed along with the various comments in the thread you linked to, and it seemed like Michael asked a few questions regarding this issue:

Were you able to resolve this issue by pushing items further forward or back on the Z axis? Or is this still an issue? If so, could you answer the questions Michael asked in that thread here on this post, so I can forward it to him? Thanks!

Hello Ben,
judging by the pictures we can see clearly that the physics object moves inside its locked Axis.Both the floor and the crate are at Y=0.The tree is at Y=-1.At the last picture we can clearly see the crate being above the floor and beneath the tree.

Hey Roccinio,

Okay, I see some slight movement in the Y for the PhysicsActor, despite the Locked Axis of Y being set in the Sprite. I have entered a bug report for the developers to look over (TTP# 347496) and I will let you know when I see any update on it.

In the meantime, I was able to see that the Y doesn’t seem to change any more than 0.1 in either direction. That’s not supposed to happen, but it does mean that you can work around it for now by moving the trees or other background sprites a little further back. I would recommend a minimum of -1 if at all possible. Using very small values (the trees in the test project you uploaded, for example, were set at -0.01) will run into some known floating point precision issues.

Hope that helps! Thanks for the report!

Any chance to see this fixed in 4.7?

I am now facing an even bigger problem with the above “bug” . I have created some big boulders (they have physics locked in the Y axis and they have a round collision box ) that fall from the sky as he enters a trigger volume.If they are higher than lets say 600 pixels then the second they collide with my floor they get stuck inside my tiles since they move in the Y axis enough for this to cause problems.This is affected by other factors as well (maybe angle ?) so i cannot reproduce it every time but it happens quite often destroying any chance of me creating a seamless game experience.

Hey Roccinio,

The developers looked into it and unfortunately are not going to be able to fix it. In the bug report, it was stated:

The axis lock option uses constraints
to lock, and due to the way the solver
works, there can sometimes be slight
violation of constraints. Maybe in the
future PhysX will give us another way
to fix this, but right now there isn’t
much we can do…

So you’ll need to stick with making sure your sprites are separated on the Y by a large enough amount, as mentioned above.

For the new issue you’ve discovered, it does appear to be related, but I believe the fix will be similar. What is the Collision Thickness on your floor and boulder sprites? The default is 100, but if I recall correctly yours is much smaller. I tested this all the way down to a Thickness of 20 with no problem. When I tried 10, however, I encountered the same problem. If you raise the boulder and/or the floor sprites, do you have the same issue? I would expect raising the collision thickness on the boulder should be enough.

What you are saying is partially true since a bigger thickness number prevents my boulder from getting stuck but it does not prevent the Y axis movement of my sprite resulting in all sort of weird things aesthetically speaking . Try to imagine a thin paper with a drawing moving back and forth when the wind blows.This is what is happening to my sprites when the above criteria are met and sometimes it stays rotated in the Y axis like the pictures i have send you above.It is not pretty Ben… :frowning:

The angle in Y shouldn’t be big enough to see from the player’s perspective, and there shouldn’t be any overlap like you have in the pictures above if there’s enough Y distance between background, foreground, and main sprites. Having a wider collision thickness should aid in avoiding that problem as well. Is there an additional problem or substantial rotation occurring? Can you post some new images, with the settings adjusted as recommended? Thanks!

Nope, everything is handled on the CPU in a cross-platform manner so there should be no difference.

I will try your suggestions and report back!

I have an all AMD build. Maybe this why i am having this problem ? Phys-x is Nvidia only so maybe it does not work on my rig.Is this the case?