godot icon indicating copy to clipboard operation
godot copied to clipboard

get_contact_collider_velocity_at_pos() strange behavior (3D)

Open Alex-doc opened this issue 10 years ago • 1 comments

Operating system or device - Godot version: Windows 10 64 bits (built on commit 6072eb8 the commit is just for reference and is unrelated with the issue)

Issue description (what happened, and what was expected): get_contact_collider_velocity_at_pos() returns inconsistent data. It seems to happen when a RigidBody hits hard something.

Steps to reproduce:

  • download the example
  • open it in the editor
  • run it making sure to have collision shapes visible

you will see on the left side, a body that falls from a lower height, it will show (0,0,0). on the right side, the body will fall from a higher place, and you will see the issue in the vector being printed.

Link to minimal example project (optional but very welcome): https://www.dropbox.com/s/rsd8vd6j8e3t81t/physbug.zip?dl=0

Alex-doc avatar Jul 22 '16 11:07 Alex-doc

Update

looks like changing this to Vector3 crB = B->get_angular_velocity().cross( c.rA ) + B->get_linear_velocity(); fixes my issue. Is it a typo?

Alex-doc avatar Jul 22 '16 12:07 Alex-doc