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

[Bullet] 3D StaticBody constant linear/angular velocity doesn't work when using Bullet #17531

Open
Tracked by #45022
eiszfuchs opened this issue Mar 15, 2018 · 7 comments

Comments

@eiszfuchs
Copy link

Godot version: 3.0.2

Issue description:

While building my first game to test Godot out, I was reading about StaticBodys in the documentation and stumbled upon constant velocity:

[...] a constant linear or angular velocity can be set for the static body, so even if it doesn’t move, it affects other bodies as if it was moving [...]

It turns out, these properties do not have any effect at all with Bullet (the default 3D physics engine in Godot 3). With the engine set to GodotPhysics, these properties work as expected.

I need to investigate a bit further, but it seems the same thing is true for the thing the documentation calls "simulated motion mode".

Steps to reproduce:

Create a new scene with a StaticBody (e.g. a floor) and a RigidBody (e.g. a ball) and let the RigidBody drop on the StaticBody. Set constant_linear_velocity or constant_angular_velocity to any amount.
The RigidBody will be launched when 3d/physics_engine="GodotPhysics", but won't do anything for any other setting.

Minimal reproduction project:

Standalone test scenes are in this repository:
https://github.com/eiszfuchs/godot-test-scenes/blob/master/Scenes/ConstantLinearVelocity.tscn
https://github.com/eiszfuchs/godot-test-scenes/blob/master/Scenes/ConstantAngularVelocity.tscn

@bojidar-bg
Copy link
Contributor

CC @AndreaCatania.

@eiszfuchs
Copy link
Author

I tried to build a test scene for the "simulated motion mode" mentioned in the documentation. From what I'm getting is that it's supposed to work when moving a StaticBody via script (such as animating a moving platform via GDScript).

I couldn't get it to work in either physics engine. I couldn't find a setting (because the documentation says it's something that has to be set active). In fact, if you Google godot "simulated motion mode", this ticket shows up, and the mention in the documentation shows up, but nothing else.
There is something about it in the 2.1 documentation on KinematicBody2D, but that doesn't seem to be valid anymore in 3.0.

I'd really like that feature, too.

@AndreaCatania
Copy link
Contributor

AndreaCatania commented Mar 16, 2018

While building my first game to test Godot out, I was reading about StaticBodys in the documentation and stumbled upon constant velocity:

[...] a constant linear or angular velocity can be set for the static body, so even if it doesn’t move, it affects other bodies as if it was moving [...]

It turns out, these properties do not have any effect at all with Bullet (the default 3D physics engine in Godot 3). With the engine set to GodotPhysics, these properties work as expected.

Really strange, when I tested it, it was working... But thanks you for your report, I'll check it.

Also, the static body is not meant to be moved around, instead use the kinematic body and move it by changing its position, or use move_and_slide, etc...

Check the godot demos (platformer demo, if I don't go wrong (The one with pink box) ) how the platforms are moved using GDS

@eon-s
Copy link
Contributor

eon-s commented Mar 8, 2019

This issue affects both Physics engines now, on 3.0.6 and 3.1b10.

@rogeriodec
Copy link

This issue affects both Physics engines now, on 3.0.6 and 3.1b10.

Here is a sample project in 3.1b11 with this issue: https://cdn.discordapp.com/attachments/212250894228652034/553366025760931844/3d_3.1.rar

@akien-mga akien-mga changed the title Constant velocity properties in 3D only work with GodotPhysics Constant velocity properties in 3D don't work Mar 8, 2019
@akien-mga akien-mga added this to the 3.2 milestone Mar 8, 2019
@realkotob
Copy link
Contributor

realkotob commented Jul 14, 2019

Still happens on latest master branch.

@AndreaCatania The issue is that KinematicBody cannot be used with Trimesh or Convex collision generated from imported Meshes (it gives an error in the console), so it is impossible to use with complex objects. 🤷‍♂

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Dec 14, 2019
@Calinou Calinou changed the title Constant velocity properties in 3D don't work 3D StaticBody constant linear/angular velocity doesn't work when using Bullet Jan 26, 2020
@KoBeWi
Copy link
Member

KoBeWi commented Dec 19, 2020

Still valid in e9d12f9

@pouleyKetchoupp pouleyKetchoupp changed the title 3D StaticBody constant linear/angular velocity doesn't work when using Bullet [Bullet] 3D StaticBody constant linear/angular velocity doesn't work when using Bullet Jan 20, 2021
@fabriceci fabriceci modified the milestones: 4.0, 3.x Mar 26, 2022
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

9 participants