Running into a weird bug with a schematic today.
The basics of it:
-There is a floor button and a stone door, which is a dynamic rigidbody.
-When the player steps on the button, the door becomes Kinematic, and lifts the door, revealing the pathway beyond.
-When the player steps off the button, there is a one second wait, and then the door returns to a Rigidbody, slamming down to the ground.
==============
All of that works well. But here's the very weird bit that I can't seem to figure out:
If I jump off the button, (returning the door to a rigidbody) and then jump back onto the button again, the schematic will attempt to raise the door again from where it currently is. (This is good!)
Here's the bad part: despite
immediately setting the door to Kinematic, it seems to be retaining any dynamic rigidbody movement that it had at the point of me switching it to Kinematic.
This means that the door super wigs out when I try to move it with Change Position again.
I thought by using 'Rigidbody Stop' to neutralize the weird rigidbody at the beginning might fix things, but it didn't at all.
======
It is definitely the rigidbody's forces causing the weirdness. Even if it's simply doing a small bounce on the ground when it lands, it attempts to continue that motion after the Change Position, slowly moving up or down.
Any ideas? I'm not sure if this is a matter of 'Rigidbody Stop' not working, it not doing what I thought it did, or just a weird unity physics bug.
Extra notes: I am using the Rigidbody2D-move position to move the door. The schematic itself is triggered as OnStay.
This guy seemed to have a similarish problem; and he solved it by setting the rigidbody to Static, which I don't believe there is a way to set within Makinom at the moment?
Of course, assuming the problem is the same.
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames