Release Type: Official Release
Version: 3.0.0.8 / 3.1.0.1-beta01-0441
Platform(s): Windows
Describe the bug
PhysicsComponent.UpdatePhysicsTransformation() adds extra offset to physics debug model when ColliderShape.LocalOffset is not 0.
That seems not to happen when a StaticColliderComponent gets CompoundColliderShape.
To Reproduce
Steps to reproduce the behavior:
public class TestScript : SyncScript
{
public override void Start()
{
}
public override void Update()
{
DebugText.Print(
$"Sphere: {Entity.Transform.WorldMatrix.TranslationVector.ToString()}" + Environment.NewLine +
$"Sphere Collider: {Entity.Get<StaticColliderComponent>().PhysicsWorldTransform.TranslationVector.ToString()}" + Environment.NewLine +
$"Debug Entity: {Entity.Get<StaticColliderComponent>().DebugEntity?.Transform.WorldMatrix.TranslationVector.ToString()}" + Environment.NewLine +
$"Debug Entity Child: {Entity.Get<StaticColliderComponent>().DebugEntity?.GetChild(0)?.Transform.WorldMatrix.TranslationVector.ToString()}",
new Int2(10));
if (Input.IsKeyPressed(Keys.Space))
{
Entity.Get<StaticColliderComponent>().UpdatePhysicsTransformation();
}
}
}
Expected behavior
Nothing happens when you press space key.
Screenshots
Step 8.

Step 9.

Log and callstacks
Additional context
I'm planning to step up and contribute on the engine, though... still intimidated. Wanted to grab this issue as my first to look at.
Most helpful comment
I'm planning to step up and contribute on the engine, though... still intimidated. Wanted to grab this issue as my first to look at.