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

Set Drive value #266

Open
olemid opened this issue Sep 12, 2023 · 1 comment
Open

Set Drive value #266

olemid opened this issue Sep 12, 2023 · 1 comment

Comments

@olemid
Copy link

olemid commented Sep 12, 2023

Is your feature request related to a problem?

No

Describe the solution you'd like

When syncing a Drive across the network, I can easily sync the value itself, but there's no easy way for me to then use this value to change the state of the other user's Drive. As it is, I need to either use the Target system, or manually set the position/angle of the drive based on the value and the parameters (like axis)

Describe alternatives you've considered

I would like a function like "SetValue" (and maybe "SetValueSilent") that sets the Drive to the correct state based on the value. It could be normalized or not.

@olemid olemid changed the title Set drive value Set Drive value Sep 12, 2023
@thestonefox
Copy link
Member

would this not cause an issue with the joint drive?

because i assume what you're after is:

given a linear drive has a travel of 0 to 10

if the drive is moved on client A then the joint is moved along the axis of the drive

and on client B, the position of the drive is synced immediately to the position of client A drive

But the issue with that is you're not changing the position of the interactable, you're driving it with a rigidbody force along the limits of the joint.

so client B cannot be synchronised without driving the interactable position with rigidbody force (which is what target value is doing)

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

2 participants