Constrain one actor to specific point on another actor?
Simply put: I have a circle that constantly spins, and I want another actor to be constrained to a specific point so that it rotates with the circle.
Imagine a frying pan spinning in a circle where the handle is a different actor than the actual pan itself.
Suggestions?
EDIT: I have tried using TShirtBooth's orbiting tutorial, but it doesn't give me the effect that I want
Imagine a frying pan spinning in a circle where the handle is a different actor than the actual pan itself.
Suggestions?
EDIT: I have tried using TShirtBooth's orbiting tutorial, but it doesn't give me the effect that I want
Best Answer
-
JohnPapiomitis Posts: 6,256
constrain self position x to cos(main.rotation+offset)+main.position.x
constrain self position y to sin(main.rotation+offset)+main.postion.y
constrain self rotation to main.rotation
main represents the actor you want it to be constrained to. Offset represents a number to offset it by. You can also do 10* in front of cos and sin in the expression to add a offset there. If you do that make sure the number your multiplying by is the same in the x and y expression, it doesnt have to be 10 though it can be anything. Play around with the offset and youll get it perfect.
Answers
@NtG
No probs glad i could help