You can use the included "FPEPlayerController" prefab, or build from scratch using the Unity Standard Asset "First Person Controller".Table of Contents
Refer to the included _GettingStarted.unity scene for an example of this setup.
To rebuild using another player controller (such as the Standard Asset version of "First Person Controller"):
It is possible to port the Interactable functionality to any player controller asset, but it is not a drag and drop exercise. Several functions must changed so that the core of FPEInteractionManagerScript.cs works as expected. All of these functions are contained in the PLAYER_CONTROLLER_SPECIFIC code region inside the FPEInteractionManagerScript.cs file.
Here is a list of the functions that currently allow FPEInteractionManagerScript to control the FPEPlayerController prefab during interactions.
|private void rememberStartingMouseSensitivity()||This function records our starting sensitivity. The Standard Asset version of the MouseLook script uses X on Character Controller and Y on Camera.|
|public void refreshAlternateMouseSensitivities()||Refreshes alternate (zoomed, etc.) mouse sensitivities.|
|private void setMouseSensitivity(Vector2 sensitivity)||Set sensitivity directly, and ensure smoothMouseChange is off.|
|private void restorePreviousMouseSensitivity(bool smoothTransition)||Restores mouse sensitivity to starting Mouse sensitivity. Vector2 is desired sensitivity. If smoothTransition is true, sensitivity change is gradual. Otherwise, it is changed immediately.|
|public void changeMouseSensitivityFromMenu(float sensitivity)||A hook for a menu or UI to set the mouse sensitivity during the game. Note in this case, both X and Y are set to the same value to simplify the UI. This can be done a different way, respecting X and Y as separate values if desired.|
|private void disableMouseLook()||Locks mouse look, so we can move mouse to rotate objects when examining them. If using another Character Controller (UFPS, etc.) substitute mouselook disable functionality|
|private void enableMouseLook()||Unlocks mouse look so we can move mouse to look when walking/moving normally. If using another Character Controller (UFPS, etc.) substitute mouselook enable functionality|
|private void disableMovement()||Locks movement of Character Controller. If using another Character Controller (UFPS, etc.) substitute disable functionality|
|private void enableMovement()||Unlocks movement of Character Controller. If using another Character Controller (UFPS, etc.) substitute enable functionality|
|public bool isMouseLookEnabled()||Returns mouse look enabled value.|
|private void DockPlayer(FPEInteractableDockScript dock)||Starts docking the player to the specified dock|
|private void UnDockPlayer(bool smoothDock = false)||Starts to Un-Dock the player from their current Dock. Note: converting this function to work with assets such as UFPS may be a non-trivial exercise. See FPEFirstPersonController.cs for details on existing implementation.|
|private bool dockingCompleted()||Checks with player controller to see if dock is currently in progress|
|public GameObject getCurrentDockForSaveGame()||For use by Save Load Manager only.|
|public void restoreCurrentDockFromSavedGame(GameObject cd)||For use by Save Load Manager only.|
|public void RestrictPlayerLookFromCurrentView(Vector2 angles)||Restricts player's look ability to be +/- specified x and y angles, relative to current reticle position.|
|public void FreePlayerLookFromCurrentViewRestrictions()||Removes any existing view restriction on player's view|
|public void suspendPlayerAndInteraction()||This function disables player movement and look, for use by SaveLoadManager or other operation that requires player be 'locked'|
|public void resumePlayerAndInteraction(bool resetLook)||This function enables player movement and look, for use by SaveLoadManager or other operation when it no longer requires player be 'locked'|
Once your 3rd party Player Controller code has these functions, you will need to follow "Building a Player Controller from Scratch" above, to ensure the child objects are present (e.g. Examination Camera, toss location, etc., etc.)Note: Some people have reported a conflict with UFPS zooming and First Person Exploration Kit zooming, but changing a couple of tags (MainCamera, for example) and ensuring the controls for each asset package don't conflict with each other seemed to solve the problem for them. Additionally, if you run into any other issues integrating the two asset packages, I can take a look at your project or code repo and help get things working as expected.