-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Unstable RigidBody when adding/applying forces/torque #25468
Comments
As seen in the video bellow the problem isn't Bullet issue when other people can do it using just bullet or other engines. |
After some time I decided to go back to the project and change things, but even applying forces does the same thing. More examples: someone on youtube: |
Don't know if it is related (I think it is), but I have similar issues. Maybe it has improved since then, but I've got a recent version of Godot and get "wobbly" physics when using the VehicleBody/Wheels setup, when driving on any kind of slope/angle, downhill or uphill. I checked my collision mesh and everything is fine. I've enabeld the "Smooth Trimesh Collision" option in the project settings, but that only helped slightly. Unwanted launch at : 6:21, 1:37 |
Yep, that one is an issue on the bullet physics engine. Sometimes, a trimesh triangle collides with the border of the box and you can see that behaviour. Time ago I've debugged that issue and provided a partial fix by introducing the smooth Trimesh Collision. In order to make sure that it works it's necessary that the controlled box shape and the trimesh shape are both at the origin so the body COM is at center. This should help a bit. |
With the controlled box shape, you mean the collision box around the body of my car? |
I gave-up on the trying to fix the vehicle code and made my own implementation using GDscript following some unity/ue4 tutorial and some research, I recommend you doing the same. Start with a simple raycast vehicle (Start here). and then you get that going well just implement what you need from Tork Open-Source Project. |
Ok, thanks for pointing me in the direction. Going to research it. In the meantime, this will need to suffice, since I'm a starter at game-development and at this moment, the only thing that bothers me is the "wobbling" and the too much slowing down when driving uphill or turning. Haven't been able to get a drift in there, even though they advice to set the wheel_friction_slip of the rear wheels slightly lower than the front wheels to get a drift. |
I recommend to just start from scratch, I have learned a lot doing that, and I made my own solution which I am 90% satisfied with (I didn't really have time to finish it yet.). |
There is just a lot to do when you're alone in doing it and everything is new. I also have an interactive environment (just managed to get one hazard triggering today) which isn't without its challenges for a beginner game-developer. Assets are created by myself too. Especially since I'm a designer, that's one thing I don't want to compromise on :). It's definitely a learning curve. There are so many things to like about Godot and even easy to do, but then there is also the same amount of moments where you think "Why does it work like that and not like" or you just need a good dose of coffée :). I mostly get stuck and just finding the right information. Not related to this issue, but something that is putting me off as a beginner and get me stuck on things I shouldn't. If they want to attract more users, they definitely need to focus on a lot more and better tutorials and making the Docs not for themselves but for everybody. |
"Beginner" means something very different to every person who comes along. I've seen everything from people who've never written a line of code before to those with coding experience but no game development background. One set of docs that addresses all of those types of beginners is impossible. That said, even if everything was perfect game development is complicated. There's no way around it. Personally, I spend a lot of my time helping people with the math that they either don't understand or never studied. Godot docs are not really a place for remedial math lessons. :P
Who is "they"? Godot and its documentation is made by volunteers. People work on what they're able to work on and contribute at their level of ability and interest. Of course there are going to be gaps where more is needed, and the number of people who are able and willing to write documentation (a very different skill from programming) is limited. If you've identified a place where information is missing or incorrect, the best thing you can do is open an issue on https://github.com/godotengine/godot-docs/issues so someone can see it and hopefully address it. There's a push right now to completely revamp the docs for the upcoming 4.0 release, so now's the time to raise issues: godotengine/godot-docs#3390 |
@eyeEmotion Looking at the class reference, AudioStreamPlayer3D's default Unit Size value seems to be 1.0. Which attenuation model did you use? Maybe we could display a node configuration warning if Unit Size is set to 0. |
@Calinou |
As a note, the original issue seems to be specific to Bullet. Using a sphere shape, I can still reproduce it in 3.2.3 stable using Bullet, but it doesn't occur with Godot Physics. |
This makes it easier to hear sound while setting up the node. Since this changes the default value, this may break existing projects slightly. This also tweaks the Unit Size editor property hint for better usability. See discussion in godotengine#25468.
Godot version:
3.0/3.1 Bullet physics engine (Godot internal doesn't even work)
Issue description:
Applying torque on a RigidBody leads into strange behavior, tested using Cylinder and Sphere collision shapes. The wheel (rigidbody) that I want to simulate rolls normally at first while trying to go threw the flat surface ground (big cube) which is strange enough, then it starts to jump and sometimes just snap in place and start to dance and never stops.
Here are two videos I recorded for the problem:
Wheel alone
A Vehicle with 4 wheels and Joints
Steps to reproduce:
Add a RigidBody with cylinder collision shape to the world with a flat static ground, then apply torque.
Minimal reproduction project:
rigidbody_physics_bug.zip
The text was updated successfully, but these errors were encountered: