Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
139 stars 2 forks source link

Character Colliders parented to a user cause bumpiness on locomotion #353

Open Sharkmare opened 1 year ago

Sharkmare commented 1 year ago

Describe the bug?

When a Character collider is parented to a User and for example You are parented to that same collider, what youd expect is that as the person moves you would stay perfectly atop that collider.

What happens instead is that depending on update lag there is a split fraction where the collider moves and intersects into your character collider, causing constant stuttering while standing on the collider and eventually if you clip too deep into it causes you to be launched off of the collider violently

This only happens SPECIFICALLY if the collider is parented to a user who is currently locomoting, this is not caused by IK movement or movement from other sources.

To Reproduce

Make character collider that ignore yourself Parent it to your head Add a character parenter that will parent a user on the box to it let someone land on your head begin moving forward they jitter and eventually get launched depending on how fast you move

Expected behavior

For it to behave just like any other source of motion meaning they would stay following the slot 1:1

Screenshots

Not really possible in this case

Resonite Version Number

2023.10.19.620

What Platforms does this occur on?

Windows, Linux

What headset if any do you use?

Index, Vive Pro eye, Quest 2, Pico 4

Log Files

There does not seem to be log output for this issue

Additional Context

No response

Reporters

eldritchkaiju

shiftyscales commented 9 months ago

Can you please provide a replication object/world for the setup you are describing, @Sharkmare?

How is the CharacterParenter being set up? Is it set to nest the users under it? Does the issue still occur if you use different settings?

What happens if you parent the CharacterCollider to the user's head by a means other than directly parenting instead? E.g. CopyGlobalTransform, VirtualParent, etc.

ohzee00 commented 9 months ago

I remember seeing this sort of behavior a while ago, I haven't tried the possible ways that Shifty suggested but when trying to figure out the issue the only thing I could think causing it was some weird interaction between streamed User root positions and colliders underneath the streamed user root. I could be wrong however, I want to do more testing overall.

Sharkmare commented 9 months ago

Can you please provide a replication object/world for the setup you are describing, @Sharkmare?

How is the CharacterParenter being set up? Is it set to nest the users under it? Does the issue still occur if you use different settings?

What happens if you parent the CharacterCollider to the user's head by a means other than directly parenting instead? E.g. CopyGlobalTransform, VirtualParent, etc.

I'll have to set something up i guess but,

Yes, it always occurs, i have found no way where this interaction does not happen when in a physical locomotion.

Unrelated to character parenter regardless of if you use one or use your own flux to parent the user issue persists.

Regardless if the user is parented to the collider directly or just a space that shares transforms with the collider the issue persists.

The only thing that changes based on the slot the user is parented to is their gravity (based on the scale of the slot) but thats normal

But yeah to save on talking through every possible permutation, it always occurs, there is no way to have someone standing on a collider that follows your user that allows you to locomote while they do so, regardless where you parent the collider to yourself, As long as the object gets translated in space due to you locomoting bumpiness and launching is inevitable (for the user standing on the collider that is parented to you)

ohzee00 commented 2 months ago

I found the possible cause and maybe fix for this!

Userroots are driven by a TransformStreamDriver, and they have a interesting checkmark that is called "RunBeforePhysics", when you uncheck this on your own userroot and do the above steps, the user parented underneath you has no bumpiness motion at all when moving via joysticks or anything that moves your userroot.

However I don't know the downside of this, I imagine it is set for a reason but I don't know exactly what it entails other than "do before physics".

Resonite_2024-08-20_01-30-13

ohzee00 commented 2 months ago

I haven't done major testing but I did realize a downside that may or may not be related to another bug, I noticed when RunBeforePhysics is unchecked on UserRoot, if a user locomotion climbs something they just disappear to world origin from everyone else's perspective but not their own.

I do know there is a slight flicker when locomotion climbing (when seeing another user climb) that may or may not be tied to it.