|
Post by 1337monkey on Dec 21, 2016 15:24:52 GMT
Could you make or help me make a mobile compability for this addon? The problem i'm occuring is the camera instantly changes it's rotation to the point you touch, not rotating smoothly.
|
|
|
Post by sjmtech on Dec 23, 2016 18:41:12 GMT
Sorry for late reply! I have not tested on mobile and so I have no suggestions for now. If I will find a moment i'll do some test.
|
|
|
Post by kajamaz on Dec 29, 2016 3:24:20 GMT
Hey, I'm a little lost. Can you give all the steps on how to do this? There are two different scripts.
|
|
|
Post by sjmtech on Dec 29, 2016 19:00:49 GMT
Hi kajamaz, there are two scripts: - FPCameraFullBodyINV.CS : The main script. - FistThirdCameraSwap.CS: (OPTIONAL) for ingame First/Third camera swap.
Instructions are in the first lines of the scripts.
FPCameraFullBodyINV.CS
1 - add "HeadTrack" tag to all animator state. 2 - drop the inVector "BasicController" prefab on your scene ad add this script on it. 3 - add a camera and set it as mainCamera (or add a custom camera in "fp Camera" field. 4 - play scene Optional: use the ContextMenu to set manually the camera in the right position in editor
FistThirdCameraSwap.CS
- assign fPCameraFullBodyINV component and the 3rdCamera gameobject - add the line below everywhere in vThirdPersonInput.cs and vMeleeCombatInput.cs
"void ResetValues(){tpCamera=null;"
Max
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Dec 30, 2016 12:46:13 GMT
Hey Man, I've got to say, thanks for putting in a feature of the FP addon that can help my game, the camera swap was a feature I suggested, thx sjmtech :D !!!!!!!
|
|
|
Post by kajamaz on Dec 30, 2016 15:00:37 GMT
Hi kajamaz, there are two scripts: - FPCameraFullBodyINV.CS : The main script. - FistThirdCameraSwap.CS: (OPTIONAL) for ingame First/Third camera swap. Instructions are in the first lines of the scripts. FPCameraFullBodyINV.CS 1 - add "HeadTrack" tag to all animator state. 2 - drop the inVector "BasicController" prefab on your scene ad add this script on it. 3 - add a camera and set it as mainCamera (or add a custom camera in "fp Camera" field. 4 - play scene Optional: use the ContextMenu to set manually the camera in the right position in editor FistThirdCameraSwap.CS - assign fPCameraFullBodyINV component and the 3rdCamera gameobject - add the line below everywhere in vThirdPersonInput.cs and vMeleeCombatInput.cs "void ResetValues(){tpCamera=null;" Max Thanks. I wanted to ask, do I add the various scripts and animator tags to my already created controller?
|
|
|
Post by sjmtech on Dec 31, 2016 9:08:41 GMT
The new system works with or without tag settings "HeadTrack" (needed by the old one) because it acts directly to the bone of the character's head. You can leave the controller as they are and add the tag only if you see ugly bones movement. In this case you need to add the tag on each animator controllers.
|
|
|
Post by kajamaz on Dec 31, 2016 19:04:46 GMT
The new system works with or without tag settings "HeadTrack" (needed by the old one) because it acts directly to the bone of the character's head. You can leave the controller as they are and add the tag only if you see ugly bones movement. In this case you need to add the tag on each animator controllers. Thank you. When ever I add the script void ResetValues(){tpCamera=null; It gives me an error. I'm not sure where you want us to add it? I don't know what you meant by "add everywhere". No matter where I place the script I get an error. I got the other script working, but is there a difference between the two?
|
|
|
Post by jrackley on Dec 31, 2016 19:38:26 GMT
The new system works with or without tag settings "HeadTrack" (needed by the old one) because it acts directly to the bone of the character's head. You can leave the controller as they are and add the tag only if you see ugly bones movement. In this case you need to add the tag on each animator controllers. Thank you. When ever I add the script void ResetValues(){tpCamera=null; It gives me an error. I'm not sure where you want us to add it? I don't know what you meant by "add everywhere". No matter where I place the script I get an error. I got the other script working, but is there a difference between the two? I added void ResetValues(){tpCamera=null; to line 110 in the vThirdPersonInput.cs script and it works well there. Hope that helps ya.
|
|
|
Post by kajamaz on Jan 1, 2017 6:29:53 GMT
Thank you. When ever I add the script void ResetValues(){tpCamera=null; It gives me an error. I'm not sure where you want us to add it? I don't know what you meant by "add everywhere". No matter where I place the script I get an error. I got the other script working, but is there a difference between the two? I added void ResetValues(){tpCamera=null; to line 110 in the vThirdPersonInput.cs script and it works well there. Hope that helps ya. Still get errors... not sure why..
|
|
|
Post by sjmtech on Jan 1, 2017 8:53:13 GMT
post here your console errors!
|
|
|
Post by sjmtech on Jan 4, 2017 11:17:19 GMT
Updated the first post with the last version.
Changelog: - fix the compatibility to the new 2.0c and Unity 5.5
Max
|
|
|
Post by jrackley on Jan 4, 2017 13:10:49 GMT
Do you happen to know why when coming out of first person view into 3rd person it defaults to the strafe(lock-on) mode? This causes a weird glitchy issue when turning while moving, if you go back into first person mode while still in strafe mode.
Steps to reproduce in included demo: Come out of first person into 3rd person and go back into first person-> try to move and turn = (glitchy)
Other than that this is really cool for sure and takes things up a notch! Thanks
|
|
|
Post by sjmtech on Jan 4, 2017 16:46:53 GMT
Hi jrackley, it occurs because "Strafe" is, of course, the only usefull state for the first-person mode and after the switch it remains active. It should not be difficult add a little modification on the code to set the default state(added to the todo list).
The problem you've encountered is becose you need to add somewhere in vThirdPersonInput.cs(Basic Locomotion) and vMeleeCombatInput.cs(Melee Combat):
void ResetValues(){tpCamera=null;} Cheers
Max
|
|
|
Post by jrackley on Jan 4, 2017 19:17:20 GMT
Hi jrackley, it occurs because "Strafe" is, of course, the only usefull state for the first-person mode and after the switch it remains active. It should not be difficult add a little modification on the code to set the default state(added to the todo list). The problem you've encountered is becose you need to add somewhere in vThirdPersonInput.cs(Basic Locomotion) and vMeleeCombatInput.cs(Melee Combat): void ResetValues(){tpCamera=null;} Cheers Max Wow, somehow that got replaced, after I was adding in this in a new test project,LOL! I swear it was there before I must not have saved my stuff or something. Thanks a lot!
|
|