Closed andy013 closed 11 months ago
Closing for now, I can't reproduce this in a demo project. It must be something else in my code that is causing the problem.
EDIT: The reason my extremely simple demo project couldn't reproduce the issue was because the model only had 1 bone and 2 hitboxes. Even if lag comp used the position of the old hitbox, it would still be correct in this case.
Here is a little clip showing the behaviour I'm seeing:
https://github.com/sboxgame/issues/assets/10728824/0815fafb-6607-474d-8782-534c34b7acb0
I tried using the citizen model and I get the same strange results. It seems like a bug to me? Unless I'm doing something stupid.
Describe the bug
I have a model with 2 HitboxSets. One of them contains all of the hitboxes, the other is all of them minus the arms.
If a trace hits the first HitboxSet I wish to swap to the second set to check if the trace would have went through the arms and hit the chest.
The problem is that if you change an entities HitboxSet while using lag compensation then it doesn't position the hitboxes correctly. I think it's using the new HitboxSet but rewinding it to the positions of the old set. I have even seen it position the new hitboxes to where a completely different model was standing.
To Reproduce
Expected behavior
Swapping the HitboxSet should work with lag compensation.
I can think of 2 potentially different use cases that may need different solutions.
This is my current use case where I want the hitbox with the arms to be active all the time but then just do a second trace to check if you hit the chest through them.
I can imagine if you wanted the model to transform and change HitboxSet then you would want to rewind to whatever HitboxSet was active for the client at the time that they shot.
Media/Files
No response
Additional context
No response