Physics constraint component


I have a problem with the constraint component, i create a PhysicsConstraint in my cube i set all the axis on free and when in my blueprint i lock all the rotation axis, linear XLimit and linear Ylimit my cube in game teleport in the location who it was when i launch my game.

I don’t know if i was clear ^^. But if someone know how to solve my problem it would be really nice :smiley:

Thanks in advance.

Yup its all because you moved only cube. End point (or start point) of physics constraint stayed in beginning location. You need to update also that point.

But there is one big problem with constarints they do horrible things to physics, when your cube collides while being limited (at exactly moment you limit its movement), other objects warp trough space. I wish epic cleared constrains (or made good tutorial about how to use them).

I had your warping problem with asteroids coming to planet orbit. Never really could solve it. Temporary hack was to calculate asteroid impact location, spawn that asteroid at exactly that location (together with constrain), then move asteroid to starting location and push towards impact location. When asteroid was at that location I turned on constraint. No warping.

I tried multiple times but I could not make it work. I could not create constrain in realtime that had beginning and end point at locations i desired, and that constrained my asteroid to orbit.

Later on we found out that gameplay on planets orbit is quite limiting us with level design, and this boring to player.

Ok thanks for the quick reply, i will try to do what you say, take the location of my cube and spawning it.

Or if you have a better solution for block rotation and linear axis i’ll take it :p.

I hope the problem with constraint will be resolved soon ^^.