normalized()
is a Vector math operation (only for complete vectors), but what it does is actually a very simple calculation: vector / vector.length()
, so maybe try:
motion.x = (self.position.x - $Chain/Tip.position.x) / motion.length() * speed * chain_velocity
Also to answer the question title, converting Floats to Vectors is nice and straight-forward, you can simply go: var vector = Vector2(vector.x, vector.y)
So another way you might be able to solve your problem is to write:
motion = Vector2((self.position.x - $Chain/Tip.position.x) * speed * chain_velocity, motion.y).normalized()
Hope it helps!