Issue with my physicscomponent

4.5

So i’m making a component? (Not sure if that’s the word.) And it’s meant to control every physics related things.

	if GravityEnabled:
		owner.velocity.y += owner.get_gravity() * delta

But why does it say: “invalid operands float and Vector2 in operator +”

But I have no error in the editor but I do when I play.

I fixed it by removing the “.y” in velocity.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.