Could you elaborate more? Like have the nozzle in a separate model to the base?
Then the calculation needs to be either:
math.asin(white arrow / hypotenuse)
or:
local magnitude = math.sqrt(hypotenuse^2 - white arrow^2)
math.asin(magnitude / hypotenuse)
You need to convert the answer to degrees using math.deg though
I’ve just accidentally done this by forgetting to comment out a line, and it appears to work? It doesn’t use the Hinge, but that’s fine with me. I think this is a solution
base.CFrame = CFrame.new(base.Position, Vector3.new(tHumPart.Position.X, base.Position.Y, tHumPart.Position.Z))
nozzle.CFrame = CFrame.new(nozzle.Position, tHumPart.Position)
Feel guilty for marking my own post as the answer, but thank’s a lot to @JohhnyLegoKing, @BuilderDolphin and @creepersaur for giving up your time
Yeah exactly. The base rotating is fine, but you can separate the nozzle into a model, making it the primary part of the model and using PivotTo() on that. It’ll make the maths way easier (hopefully), and you wont have to use hinges.
Looks great to me 30charlimit
Yea it works with just those two lines. Was expecting it to be way harder
Appreciate your help, can’t believe we didn’t need all that trig after all. Also saves the use of HingeConstraints, since they are a bit glitchy!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.