|
Post by Invector on Jan 22, 2018 13:59:49 GMT
Just remove the instance verification from the vThirdPersonController Start method Basically it verifies if there is more then 1 instance on the scene and destroy, we use that to avoid creating another character if you load a scene using the vPortal scheme.
|
|
|
Post by jtmoustache on Jun 10, 2019 0:23:46 GMT
Step 1.
In vThirdPersonInput.cs -> Remove [HideInInspector] for those two properties: public vCamera.vThirdPersonCamera tpCamera; public Camera cameraMain;
Step 2. Create Another Controller, camera will be replaced.
Step 3. Copy camera, change target for each camera so you have a camera for player 1, a camera for player 2.
Step 4. In the Shooter / Melee / Tp Input -> Camera setting of each character -> drag the specific camera to tpCamera and mainCamera
Step 5. Set different inputs for each character, e.g wasd for character 1 and horizontal/vertical arrows for character 2.
Step 6. In ThirdPersonController menu of each character -> Grounded -> use instance -> unchecked.
|
|
|
Post by jtmoustache on Jun 11, 2019 1:37:20 GMT
Actually, a lot more steps were necessary to get a working split screen. Can't summarize all the steps, but a good rule of thumb is to remove all the singletons "instance", except on the GameController, and adapts the scripts. The super annoying part was the automatic detection of the input device, I ended up creating a _forcedInputDevice for each of the character which stops the autodetection. What helped me was to instantiate the camera, and the hud through the gamecontroller.
Once the singletons are gone, and you manage to isolate the functionality for each player individually, the code adapts quite well to multiplayer.
|
|
|
Post by schweinehundprod on Aug 18, 2019 11:28:45 GMT
Step 1. In vThirdPersonInput.cs -> Remove [HideInInspector] for those two properties: public vCamera.vThirdPersonCamera tpCamera; public Camera cameraMain; Step 2. Create Another Controller, camera will be replaced. Step 3. Copy camera, change target for each camera so you have a camera for player 1, a camera for player 2. Step 4. In the Shooter / Melee / Tp Input -> Camera setting of each character -> drag the specific camera to tpCamera and mainCamera Step 5. Set different inputs for each character, e.g wasd for character 1 and horizontal/vertical arrows for character 2. Step 6. In ThirdPersonController menu of each character -> Grounded -> use instance -> unchecked. This worked quite well for me but i cant control the keyboard player with the mouse that means he dont goes in the direction i look. what can i do?
|
|
|
Post by schweinehundprod on Aug 18, 2019 11:32:27 GMT
figured it out all you had to do was (cause in the new version there is no main camera variable) replace the Camera.main with tpCamera.gameobject
|
|