I made a simple script which creates two static mesh components and binds them together with a physics constraint at the very end. The constraint does show up in the editor, but when I run the Blueprint in the scene the static mesh with physics enabled just falls to the floor as if no constraints were acting on it.
Side Note: The variable Distance To Cube is just a float storing how high or how low the second cube is from the first cube. I had it set to -75 in my testing.
Does anyone know what is causing this behavior? Could this be a bug with the engine?
Below is a shortened version of my code. It still doesn’t run properly, but it is more concise. You can easily replicate the problem by pasting this code in the construction script of your Blueprint.
I received my answer from forum user LsRainbows on this forum post. The reason why it was not working was because I was using the Construction Script instead of Event BeginPlay. I am very appreciative to LsRainbows for pointing that out to me.