Hi! I want to make a physics cart that goes along a spline, I tried something but it doesn’t work. What I want is to be able to push the cart and have it follow the spline, without tipping it over or taking it off the spline, just being able to push it forward and back on the spline.
I tried, with the setting of the actor it doesn’t work because the rest of the components are linked to a physics static mesh (Base).
I thought that I don’t need to set the location of the cart because I need it to be able to be pushed through physics. So, I figured the Z rotation should be fine, as if the cart was hanging on splines. I didn’t manage to solve it either, I tried something but I can’t push the card…
I don’t understand why it’s so hard to get something like this out. i want something like you have a string and a ball with a hole in it and the ball follows the string through physics… maybe it’s possible but I don’t understand how it can be done
Let’s just look at location first. You can subtract the cart location from the location it should be at on the spline, which will give you a direction vector. Reverse this ( *-1 ) and add force to the cart.