Anchor point
-
@iTap-Development Jack is right. This is how you work out the diagonal distance between two points if you know their coordinates.
-
@iTap-Development A hacky, tacky way to achieve the goal:
Create a dummy object that you'll use as a virtual anchor point. Use the physics weld joint to bind your rotating object to the dummy object at the position you want relative to the virtual anchor point. Then rotate the dummy object. This should give you the result you want, but will ruin anything else regarding physics.
But I agree. The anchor point should be respected by the rotate behaviour.
-
@Deeeds that would work kinda, but yeah it wouldn’t work well in some ways.
-
@Aidan-Oxley @Jack8680 oh duh! So you are just multiplying the x and y by them selves for the x and y distance to the other point?
I think I always just added the actual x and y distances. -
@iTap-Development You know Pythagora’s theorem? If you have a right angle triangle, a is the length of one side, b is the length of the other and c is the length of the hypotenuse (the longest one, diagonal if a is x and b is y), then c² = a² + b². What I was trying to work out is the diagonal distance between two points. I can easily get the x and y distance between them, but I wanted diagonal.
-
@Aidan-Oxley sorry! I was confusing with something else in my project 🤦♂️ I’ve only got a few hours of sleep every night for a week due to my 3d printer addiction! so my brain doesn’t work....
-
@Aidan-Oxley so why are you multiplying the sine and cosine angles by the diagonal distance?
-
@iTap-Development I don’t remember lol. There is a reason though. It’s probably one of those formulas like hypotenuse = sin(θ) × opposite.