Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VehicleBody2D #27901

Closed
LinuxUserGD opened this issue Apr 10, 2019 · 3 comments
Closed

VehicleBody2D #27901

LinuxUserGD opened this issue Apr 10, 2019 · 3 comments

Comments

@LinuxUserGD
Copy link
Contributor

LinuxUserGD commented Apr 10, 2019

Feature request:
It would be nice to have a VehicleBody2D node (not top-down vehicle but from side view).
Currently this is only possible with a 3d VehicleBody and linear x, angular y and angular z axis lock.
It could have the same properties like the 3d VehicleBody (brake, engine_force and steering https://docs.godotengine.org/en/latest/classes/class_vehiclebody.html ) but steering means the car rotates in the air and on ground so it is possible to do a wheelie.

@toger5
Copy link
Contributor

toger5 commented Apr 10, 2019

in 2d this is quiet simple to implement. No sure if it is worth having a node. but it would still be simpler. and in terms of consistency (3d vehicle) it also would make sense.

you can try: rigid body + two ray casts + apply force at ray cast collision point (for throttle + suspension... orientation calculated by (perpendicular to the) collision shape normal and ray direction) + apply torque. should be a matter of minutes to set up.

@groud
Copy link
Member

groud commented Apr 11, 2019

IIRC, the plan was more to move out the vehicle3d node to a plug-in instead of adding a 2d version.
So the 2d version better fit a plug-in IMHO.

@LinuxUserGD
Copy link
Contributor Author

test.zip
Closing as it's already possible with pinjoints (see example project).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants