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

if Trace.Body hit an SdfWorldEntity, S&box crash #21

Open
PolSpock opened this issue Oct 29, 2023 · 0 comments
Open

if Trace.Body hit an SdfWorldEntity, S&box crash #21

PolSpock opened this issue Oct 29, 2023 · 0 comments

Comments

@PolSpock
Copy link

PolSpock commented Oct 29, 2023

Describe the bug

Hi,

If you run a Sandbox.Trace.Body(PhysicsBody, Transform, Vector3) and your Trace hits a SdfWorldEntity who has any SDF collision (like solid, trigger, water or whatever), your s&box will crash.

Unfortunately, s&box doesn't give any other information about the crash

To Reproduce

  1. Create any SdfWorld 2D or 3D and initialize it with some surface who have at least one Collision tag.
    So for example, with the BlobTool.cs, create some blob with the default SDF material default.sdfvol

  2. Run a Sandbox.Trace.Body(PhysicsBody, Transform, Vector3), so for example add this code in the Simulate block of BlobTool.cs

if (Game.IsServer)
{
	Trace collisionTrace = Trace.Body( Owner.PhysicsBody, Owner.PhysicsBody.Transform, Owner.Position + Vector3.Down * 32f ).Ignore( Owner );
	Log.Info( collisionTrace.Run() );
}

The crash also occurs when Trace is running Clientside.

  1. Walk on the created Sdf Blob with the BlobTool in hand: your s&box will crash

Expected behavior

Running a trace on sdf entity should not crash s&box

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant