RigidBody.isKinematic not toggleable if UdonBehavior.synchronizePosition = true
complete
H
Hiina Kuukan
Reproduction:
- create 3d object cube
- add VRC_Pickup script
- add UdonBehavior
- Set UdonBehavior.synchronizePosition = true
- Add simple Udon script to the UdonBehavior that runs the equivalent of
Interact() { GetComponent<RigidBody>().isKinematic = true }
Expected:
When you pick up the cube in game and drop it, it'll remain in place as it's kinematic.
Actual:
Cube remains non-kinematic and falls to the floor.
If you unset Synchronize Position, toggling isKinematic behaves as expected, for an otherwise identical setup.
Log In
Phasedragon
marked this post as
complete
Momo the Monster
marked this post as
in progress
Fixed in UnU
Momo the Monster
Merged in a post:
Cannot change the IsKinematic property of a Pickup object
poplopo
Repro
:- Create a cube, add a rigidbody and VRC_Pickup component
- Add an UdonBehaviour that changes the isKinematic property of the cube on some event
- Go into the world and test the event. The IsKinematic property does not change.
Note
: There are times I can get the isKinematic value to change temporarily
- for example, at OnPickup while the item is held. But the value is reset back to its default as soon as I drop the item.Momo the Monster
Merged in a post:
Unable to change kinematic or gravity on position synced udonbehaviours
Phasedragon
This is the same issue seen with objectsync on SDK2, but in that case there was a sendRPC that allowed you to change it. There is no such ability with udonbehaviours as far as I can see.
Joker is punk
There does appear to be a workaround for this, for now. Tested with Use Gravity. The state seems to revert to whatever it was on world load on the frame following the frame when you set the state. So, if you set the boolean of either of these on every FixedUpdate, then it'll behave as expected.
But make sure to explicitly set it back to its original state, and don't rely on the bugged reverting, otherwise when they fix this it'll break your code.
Joker is punk
Update on this, the workaround works well but does seem to fail sometimes in somewhat predictable ways
PhaxeNor
Contains two falling cubes with sync and not sync.
Ruuubick - Designer
marked this post as
tracked
PhaxeNor
This is still happening. With Sync position on and kinematic toggled on it will stop for a brief moment, then start falling again.
Kosyne
Ah, this is why I kept having so much trouble. Hardly anything on the rigidbody takes effect when sync is on :/
poplopo
Well. I have been informed that "Udon Bugs" is not the proper Canny to report Udon bugs.
Load More
→