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

Vehicle physics is broken with current Godot. #4146

Closed
slapin opened this issue Mar 26, 2016 · 14 comments
Closed

Vehicle physics is broken with current Godot. #4146

slapin opened this issue Mar 26, 2016 · 14 comments
Milestone

Comments

@slapin
Copy link
Contributor

slapin commented Mar 26, 2016

Operating system or device:
Linux, but seems unrelated

Issue description (what happened, and what was expected):
Setup a car using the same parameters as in truck town demo.
Don't add collision shape. Use y-offset of 0 for the wheels from body, and setup
every wheel parameter to the same configuration as in demo.
Don't add collision shape yet, test your car - it should be stable on flat ground,
no jumping, just stationary.

Steps to reproduce:
Add collision shape (I used Box). The expected outcome is nothing changed in car behavior.
Actually, car starts to vibrate at high pitch rate. Delete collision shape - nothing changes, still vibrating and jumping around surface. The only way out is delete scene and start anew.
Not adding collision shape avoids this bug, but everything passes through your car then.

Link to minimal example project (optional but very welcome):
Will add if nobody can reproduce this.

It seems that other tweaking of parameters lead tho this problem, but it is quite random and unrelated,
as returning to known set won't fix it and problem still persists.

Video, demonstrating this bug: https://youtu.be/IzwvcN0Jbo0

@slapin
Copy link
Contributor Author

slapin commented Mar 26, 2016

Another workaround is replace the VehicleBody node with Spatial using UI button,
then run scene once, then replace it back with VehicleBody.

@slapin
Copy link
Contributor Author

slapin commented Mar 26, 2016

well, it seems you have to delete CollisionShape then use above workaround to get rid of vibration and jumpiness.

@slapin
Copy link
Contributor Author

slapin commented Mar 26, 2016

Single huge CollisionShape fixes this problem, it seems that stability depends on CollisionShape size,
which is really really weird.

@slapin
Copy link
Contributor Author

slapin commented Mar 26, 2016

it seems that everything depends on CollisionShape size, looks like the bigger the collision shape,
the more stable we are. Wiat it is used for? Momentum? At leas this should be configurable,
as adding one smaller CollisionShape makes car go haywire.

@slapin
Copy link
Contributor Author

slapin commented Mar 26, 2016

At least some multiplier should exist to control this behavior...

@slapin
Copy link
Contributor Author

slapin commented Mar 26, 2016

Trying to setup vehicle Godot crashes without any errors specified. Console output:

CLOSING CONNECTION
TextureButton: 16,-4
Label: 108,63
HBoxContainer: 112,27
SAVING: res://vehicles/new_scene.scn
SAVING: res://vehicles/new_scene.scn
running: /home/slapin/godot/bin/godot.x11.opt.tools.64 -path /home/slapin/school-rage/main -rdebug localhost:6007 -p 0x0 res://vehicles/new_scene.scn
********* listening on port 6007
OK! 15
has connection!
has connection!
shit?: Connection reset by peer
ERROR: read: Server disconnected!

At: drivers/unix/stream_peer_tcp_posix.cpp:276.
CLOSING CONNECTION

@slapin
Copy link
Contributor Author

slapin commented Mar 26, 2016

Well, I will stop digging on this, hope somebody will fix this can of worms.

@DriNeo
Copy link

DriNeo commented Mar 27, 2016

Center of mass is a too critical setting.

If the center of the body shape is approximately the same of the body origin, the vehicle is stable.
But it may be desired to set the center of mass as real cars.
The issue can be reproduced in Trucktown demo by moving the center of mass a little.

@slapin
Copy link
Contributor Author

slapin commented Mar 27, 2016

The thing which troubles me most is car stability depending on collision shapes.
Also random problems requiring swapping VehicleBody to Spatial and back.

@Zireael07
Copy link
Contributor

Is this still an issue?

@slapin
Copy link
Contributor Author

slapin commented Apr 13, 2017

Dunno, not used Godot for a long time now, and will not be able to for several months.
If anybody cares, please re-test. If not, feel free to close.

@Zireael07
Copy link
Contributor

I'm seeing the vibrations on my project exported to 3.0 (strangely, no vibrations in 2.0).

This is in the same test project as #8651

@LinuxUserGD
Copy link
Contributor

#12521

@akien-mga
Copy link
Member

Closing as superseded by #12521.

@akien-mga akien-mga added this to the 3.0 milestone Mar 3, 2018
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

6 participants