I'm hoping to include a third person controller in my game. I've tried both the AC version and the "advanced" version in downloads but found that both have the effect of the camera clipping through walls when orbiting while standing against a wall. Maybe this is an issue with the settings, so if anyone has conquered this please let me know. In any case, I have used a controller from the asset store before called Character Controller Fundamentals, and I really like it. It is the control scheme I desire, so I threw it in to see what happens. An interesting thing is that the camera is a child of an object on the player in that controller, so it made for some interesting issues, especially when you put the _camera script on the camera. Seems like the controller movement is being added to, or maybe that isn't part of the camera issue. Basically I want to be able to use the controller but still have AC direct the character to hotspots, etc. That doesn't seem to work properly with the Animation controls set to "Automatic". Again, it seems to do things like walk to markers facing the wrong way (which may be a conflict). When set to "Manual", the controller seems to work properly but now I can't do things like "walk to marker", or "turn to face". I'd love to hear if anyone here has had luck with a third person controller and maybe some tips if you have any.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I just found the script in the manual that allows you to switch from automatic to manual control and back again. trouble is, when I switch to the cutscene and the player runs to the marker, he is facing the wrong way as he runs and then turns to the incorrect direction when he gets there.
Also, I was wrong about the asset name, it is "Character Movement Fundamentals".
As each controller asset varies in technique, and project in needs, there's no "set way" to go about integrating a custom controller - but the process generally falls into two approaches:
1) Switching the AC Character's Motion field between Automatic and Manual, based on whether or not you need AC to move the character.
2) Leaving the motion as Manual, but instructing the custom controller to follow AC's direction when in e.g. a cutscene.
With the former, bear in mind that you must also tell the custom controller script to relinquish control over the character (both position and rotation) when you want AC to control them. It sounds like both AC and your custom controller are "fighting" for control, so you'll need to disable the effect of the controller at the same time you set the motion field to Automatic - and re-enable it when set back to Manual.
Exactly how you do this will vary from controller to controller, but you should be able to contact the asset's developer for advice on this. Often it can be simply a case of disabling the component itself.
With the latter, it's necessary for your integration script to prevent user-input when in e.g. an AC cutscene - but still have it be able to move based on the intended position/rotation that AC has for it. This is the approach taken in this tutorial. The main functions that you can read to get the "intended" orientation of the character are:
This approach is a lot more involved, since the custom controller needs to be equipped with the ability to move based on a target position / rotation, or have this ability added through custom script. Again, there's no "set way" to go about this, as it will vary with the controller and needs of your project. This is why the first approach is generally the easier one to take - but care must still be taken to make sure the two don't conflict with each other.
If you're still having trouble, feel free to post the integration script you're trying out. I can't advise on the half that deals with the custom controller, but can at least see if the AC side of things is correct.