by fiaKaiera
[ *.unitypackage ] [ *.zip ]
VRChat door system that acts semi-realisitically.
These doors can be locked or forced open/closed using events.
Currently, only sliding doors exist.
[ Changelog ] [ How to Install? ]
Unity > Package Manager > Add from git URL:
https://github.com/fiaKaiera/vpm-listing.git?path=/Packages/net.fiakaiera.door
Lock(), Unlock(), and ToggleLock() custom eventsForceOpen() and ForceClose() custom events (will unlock the door)SlidingMinSpeed is 0 or less)SendCustomEventDelayedFrames instead of UpdateUdonSynced variables (2 floats, 1 bool)
If installing via
*.zipmake sure you extract the contents into a new folder callednet.fiakaiera.doorinside your Unity project’sPackagesfolder.
Packages\Real-ish Doors\Prefabs
Packages\Real-ish Doors\Door showing how the door works!Simply put: It would be appreciated if you credit when you use this asset to fiaKaiera.
It can be in any form as long as it is clear and concise.
Example:
Real-ish Doors by fiaKaiera
https://github.com/fiaKaiera/vpm-listing
It’s entirely optional but if you do, it will help spread the word and supports the growth of this asset within the VRChat community.
The door prefab contains a DoorBehaviour object inside it, depending on what door it is. (SlidingDoor / HingeDoor)
IsLocked variable and can only be changed with Lock() and Unlock() eventsSlidingDoor, in degrees for HingeDoor0 or less will immediately close/open the doorSlidingDoor, in degrees for HingeDoor0 or less disables thisSlidingDoor, in degrees for HingeDoorOnDoorGlobalHandleUseUp() to listeners globally.OnDoorGlobalHandleUseDown() to listeners globally.Transform where the door is located. If you need a visual for the door, it is placed here.Collider when closed. Is enabled when closed.DoorHandle that makes the door’s handle. Requires a VRC Pickup to function.OcclusionPortal that blocks occlusion when closed.AudioSource that plays closing, opening, locking and unlocking sounds.AudioSource that plays when the door is sliding.Public Variables
IsLocked - If the door is locked.IsOpen - If the door is open. This uses a calculation, so cache if needed.OpenPercent - The percentage the door is opened.forcedSlidingSpeed - See Forced Sliding Speed.These functions can be called through UdonSharp as functions or through “Send Custom Event” in Udon Graph.
Lock() - Locks the door, does nothing when already lockedUnlock() - Unlocks the door, does nothing when already unlockedToggleLock() - Toggles the door’s lock state. Depending on its state, it will automatically call Lock() or Unlock()ForceOpen() - Forces the door open, unlocking the door if it is lockedForceClose() - Forces the door closed, unlocking the door if it is locked
Lock() insteadFor listeners, these will be the events the door will send.
OnDoorEnabled() - Triggers when the door (or its gameObject) is enabled
OnDoorEnableOpened(), OnDoorEnableClosed(), or OnDoorEnableLocked()OnDoorDisabled() - Triggers when the door (or its gameObject) is disabledOnDoorEnableOpened() - Triggers when the door on start or is enabled while in the open stateOnDoorEnableClosed() - Triggers when the door on start or is enabled while in the closed stateOnDoorEnableLocked() - Triggers when the door on start or is enabled while in the locked state
OnDoorEnableOpened() and OnDoorEnableClosed() is not sent when lockedOnDoorOpened() - Triggers when the door is opened from being closedOnDoorOpenedFully() - Triggers when the door is opened fullyOnDoorClosed() - Triggers when the door is closed from being openedOnDoorLocked() - Triggers when the door is locked, before the door is closed if opened (will trigger OnDoorClosed if locked from open)OnDoorUnlocked() - Triggers when the door is unlockedOnDoorPickup() - Triggers when the door handle is picked upOnDoorDrop() - Triggers when the door handle is droppedOnDoorLocalHandleUseDown() - Triggers when the handle’s use is pressed locallyOnDoorLocalHandleUseUp() - Triggers when the handle’s use is released locallyOnDoorGlobalHandleUseDown() - Triggers when the handle’s use is pressed globally
OnDoorLocalHandleUseDown() triggers first locallysendGlobalHandleUseUp to be enabledOnDoorGlobalHandleUseUp() - Triggers when the handle’s use is released globally
OnDoorLocalHandleUseUp() triggers first locallysendGlobalHandleUseDown to be enabledUnimplemented.
A sliding door that opens from left to right.
SlidingDoor transform itself than adjusting the PointClosed and PointOpened objects.PointClosed and PointOpened dictate how far the doors open/close.
An interactible Collider that plays a knocking sound for everyone to hear.
Attach this as a listener to any DoorBehaviour (SlidingDoor / HingeDoor) to make it automatically disable when the door is opened.
The scene example shows it separate, but can be attached to the door if needed.
AudioSource that will play the knocking sound.OnDoorKnock() - Triggers when the door is knockedBest report them through the Issues tab.
If you are savvy enough, then you can try making a pull request fixing the issue.
material-symbols:door-open from Material Symbols, fetched from IcônesSeeing MMMaellon’s Real Fake Doors not being updated since LightSync was out for testing, but have the ability to do it optimally without the reliance of SmartObjectSync
net.fiakaiera.door
https://github.com/fiaKaiera/vpm-listing/blob/main/Packages/net.fiakaiera.door/README.md
1.1.5 (Changelog)
2022.3.22f1 or later
No dependencies
No legacy packages
https://github.com/fiaKaiera/vpm-listing/blob/main/Packages/net.fiakaiera.door/LICENSE.md