Position a point on another point

How can i make 2 points position them self on eachother, kinda like a joint, so basically, Set X position of Object.PointX(“point1”) set to Object2.PointX(“point2”), something like this. lmk if you know how to do that :slight_smile:

Hi, for this you can use one of the position actions, in your example “Change the X position of an object”.


You can specify to which point of object B your object A will be moved, e.g.


The only issue could be that the origin point of object A is used as default for setting the X position and - as far as I know - you cannot change this to a custom point. But you can move the location of the origin point of your object A manually wherever you want it to be connected to object B.

Yea this is an option, although i was looking for custom points :confused:
thanks for the help tho

I’m guessing this is for your clothing question in your other post. I’ve been thinking about that question and was thinking similar to you about using points. And yeah, you can have a custom point for say, the arm, but don’t think you can ‘snap’ it to a custom point on the body, say the shoulder. I like what you’re trying to do though and will keep thinking about it. I feel like there’s a way. I did a thing a while back where I attached arms to a body with Put the object around another which involved trial and error for finding the distance and angle. I might do some experiments with it to see how much can be done with it. I originally used physics revolute joints but it caused slow down problems because I was using it with tweened angle movement.

I would only have to go through the pain of putting the points in the right spot once, so i don’t think that would be too big of a problem, thanks for your help tho, and sorry for the late reply

Yes, but depending on how complex the movement of your character animations are, would you have to ‘slice’ each item of clothing up? Eg: chest, left arm, right arm.

Just to answer the original question, you need to do math to achieve what you’re looking for.

Simply use a position event on the object (that you want to move) that is: ObjectToMoveTo.PointX(“PointName”)-(ObjectBeingMoved.PointX(“PointName”)-ObjectBeingMoved.X())

And do the same but for Y. This basically is saying “Move objectA to the destination point of objectB MINUS the difference between the point on objectA and objectA’s origin point”.

You can probably save some complexity by storing that difference at the start of the scene in an object variable, if you want. You will also need to change the very first - to a + if you’ve flipped the object (assuming you’re also flipping the other object).