[Feature Request] Add impulse
information to Stride.Physics.ContactPoint
#2490
Labels
impulse
information to Stride.Physics.ContactPoint
#2490
As Stride API indicated,
Stride.Physics.ContactPoint
gets collision information in simulation via an internal methodLatestContactPointsFor()
, in whichContactPoint
obtains the contact data in a buffer and returned with Bullet Native API (to be elaborative, it's frombtManifoldPoint
/ManifoldPoint
in BulletSharp).stride/sources/engine/Stride.Physics/Simulation.cs
Lines 493 to 506 in 4c46fdc
Since it's found that Stride ContactPoint provides limited contact info about collider, normalvec, distance and point pos. But other game engines can also provide the impulse of contact (e.g., in Unity, we can get this via
ContactPoint.impulse
field, in Godot we can find this viaget_contact_impulse
of PhysicsServer), which is missing in Stride API but actually supported inBulletSharp.ManifoldPoint
(point.m_appliedImpulse
).stride/sources/engine/Stride.Physics/ContactPoint.cs
Lines 11 to 39 in 4c46fdc
AFAIAC, sometimes this impulse information is useful for physics interaction manipulation, so it's probably necessary reasonable to provide this in ContactPoint since the underlying Bullet body is literally not accessible directly as
internal
member of RigidbodyComponent.The text was updated successfully, but these errors were encountered: