• 2D
  • Disable spring rotation / 2d side-view vehicle example

Hi.<br />I am trying to re-implement one of my projects (box2d) and cannot understand how to set 'setFixedRotation' or whatever on godot's damped spring thing. It is weirdly spinning, I want it only to collapse and expand. Also, I cannot find any 2d vehicle example (2 wheels, body, springs)

You need to use a groove joint along with the damped spring to limit the movement to one axis. I would prepare to be disappointed if you're moving from Box2D to Godot's physics. I mean, until a month ago Godot didn't even have an add_torque function. The DampedSpringJoint2D is limited to 64 "stiffness", which in my experience is not high enough to be very useful. Not that it's hard to write your own damped spring, just giving you a heads up.

[quote author=Ross link=topic=15550.msg16445#msg16445 date=1464351207]Not that it's hard to write your own damped spring, just giving you a heads up.[/quote]Alright, thank you. I've suddenly found a built-in classes VehicleBody and VehicleWheel and now I am going to try to maybe go 3d way with fixed camera.