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

Interactable objects stutter, lerp not working #14

Open
jasonofthestorm opened this issue Feb 6, 2020 · 4 comments
Open

Interactable objects stutter, lerp not working #14

jasonofthestorm opened this issue Feb 6, 2020 · 4 comments

Comments

@jasonofthestorm
Copy link

jasonofthestorm commented Feb 6, 2020

Amazing work, really happy to have a networked project up and running! I noticed that networked objects appear to move at a lower framerate. I see the objects have their transforms set to lerp but it isn't smoothing out the movement. Since you mention that your scripts for this aren't actually necessary, I tried the default Photon scripts instead which work great, so I will just use them moving forward. Still, I am curious about why your script isn't working, and the potential benefits if I can get it working.

@jasonofthestorm jasonofthestorm changed the title Interactable objects stutter, lerp not working? Interactable objects stutter, lerp not working Feb 6, 2020
@quintesse
Copy link
Owner

quintesse commented Feb 6, 2020

Glad you like PlayoVR! And thanks for opening this issue because it's indeed something I need to look into. Those scripts used to work but I must have broken them at some time. They are indeed not necessary, I just liked my implementation better than the stock PUN one (but then they should of course work as advertised)

@brainsplitterstudios
Copy link

Great! I'm starting to see the advantages that would come with yours, particularly when it comes to combining transforms with rigidbody velocities.

Do you recall if your script had a solution for interpolated held objects with physics? If the object is an interpolated non-kinematic rigidbody being held by one client, other clients will see it drop to the floor or jerk up and down below the hand (because there is no grab attach joint to hold the object in place on their end, the Transform view is fighting with gravity on the rigidbody). I wrote a script which sends an RPC to make the object kinematic for all clients besides the user grabbing it which seems to work great, but I'd love to know what you were doing too, or if you have any advice on dealing with that.

Thanks so much!

@quintesse
Copy link
Owner

Yeah, that's actually one of the features of the NetworkObject: https://github.com/quintesse/PlayoVR#about-parent-option, it not only handles movement but also any reparenting that happens. And any object that is made a child of another object automatically become kinematic, so no need to send that explicitly. It also means that the state on the remote client more closely resembles the local one.

@blanxdev
Copy link

blanxdev commented Aug 6, 2020

Did anyone figure out how to improve the stuttering? I think it is somehow related that the values are not lerped in the update loop.

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

4 participants