World Space Manager
Workflow
A component responsible for handling 3D/world space canvas rendering. It requires lots of resources, such as; a main camera, an external camera for DreamOS Canvas, a render texture and an enter mount. Instead of assigning/creating those things one by one, you can simply use ‘Tools > DreamOS > Create World Space Resources’.
Controller
World Space Resources includes a player controller. To get rid of it and implement with your current character controller, here’s a step-by-step guide:
- Select the World Space Resources > Player Controller object and delete it.
- Add your main camera to the ‘Main Camera’ field available on the World Space Manager component.
- In order to move your camera to the mount smoothly, you need to disable the camera control On Enter, and then enable On Exit. This kind of depends on your camera controller/system, but you can disable the camera controller On Enter, disable the whole Main Camera object On Enter End, enable the camera object On Exit, and then lastly enable the camera controller On Exit End. This might sound a bit confusing, but you can understand the logic after looking at the example player controller.
- World Space Resources comes with some 3D objects. Those are only for demonstration, you can delete them as you like. Make sure that you don’t delete ‘DreamOS OS Renderer’, which you can find at World Space Resources > Environment > Monitor.
- There’s an object called ‘Enter Mount’. It’s basically a transform that makes the transition between the DreamOS canvas and the player camera. You can change its position based on your needs.
If you don’t want to use floating icon, you can delete its resources and then leave the ‘Use Floating Icon’ field null. You can also change the transition speed and some other settings using the World Space Manager component. In order to make the transition, this system requires a collider. You can add any collider to the object (if it doesn’t already exist).
Scripting
using Michsky.DreamOS; // namespace
public WorldSpaceManager wsManager;
void YourFunction()
{
wsManager.autoGetIn = true; // Set auto get in state
wsManager.requiresOpening = true; // Enable or disable DreamOS on enable
wsManager.transitionSpeed = 10f; // Change transition speed
wsManager.GetIn(); // Enable in transition
wsManager.GetOut(); // Enable out transition
}
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.