Facepunch / sbox-issues

175 stars 12 forks source link

SceneTraceRay `IgnoreGameObjectHierarchy` doesn't ignore hitboxes #4347

Closed Fortune117 closed 9 months ago

Fortune117 commented 9 months ago

Describe the bug

I have some code that looks like this:

        var tr = Scene.Trace.Ray( Transform.World.PointToWorld( Center1 ), Transform.World.PointToWorld( Center2 ) )
            .WithoutTags( "nohit" )
            .UseHitboxes()
            .IgnoreGameObjectHierarchy( ignoreTarget )
            .Radius( Radius )
            .Run();

        Log.Info( ignoreTarget );
        Log.Info( $"HIT: {tr.GameObject}" );

this should make the players sword ignore their own body, but as you can see it still detects a hit on it:

https://github.com/Facepunch/sbox-issues/assets/7847372/b72ca529-7417-424f-a9e4-f0a4cc7eece3

To Reproduce

  1. Run a trace through some hitboxes set up on an ignored game object
  2. See that it still detects the hitboxes on that object.

Expected behavior

hitboxes should be ignored as well

Media/Files

No response

Additional context

No response

garrynewman commented 9 months ago

Should work next build

Fortune117 commented 9 months ago

Seems to still have the same issue on the latest build

dch-GH commented 9 months ago

Also just confirmed myself it still not working on latest build

garrynewman commented 9 months ago

Fixed - probably

Fortune117 commented 9 months ago

Same problem still

garrynewman commented 9 months ago

God damn it, I'm actually gonna test it this time

garrynewman commented 9 months ago

Image

garrynewman commented 9 months ago

I just realised that's the wrong thing! BRB!

garrynewman commented 9 months ago

Okay we got there!

Image