Hi Chris and hi to all.
I can't find a solution for use the nice movement of drag camera "AdvancedThirdPersonCamera" with my Point and Click movement on mobile game.
When i mark "Is drag-controlled" i get the fluid and nice movement of the camera but when i drag with my finger... the navmesh read 1 touch and the player move.
Are there a method for use the "is drag-controlled" movement of the AdvancedThirdPersonCamera without move the player every time i drag on the display?
I've try to implement the SimpleTouchController with the Wiki integration but the movement of the camera is not so kind as the AdvancedThirdPersonCamera drag controlled.
Thanks,
Paolo
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Ok, sorry. After 3 hour i've find the solution
On Setting - Double Click Movement = Required to walk.
So i can drag the camera without move the player.
Recreated. Not immediately obvious how to work around it, but I will have a think.
Try this. Create a new Input button in the Input Manager named "Drag", and map it to "mouse 0" as the Positive Button.
Then attach the following script as a component to the Third Person Camera:
In about 4 hour i’ll try Your script and i think it will be the perfect solution. Thanks a lot! 🎄😊
Ok, Chris. I've tried your script but it work in strange mode.
Now when i click on navmesh the drag camera don't work but work only if i press out of the navmesh.
I'm searching a mode to disable the input on the navmesh if i press for dragging the camera also on navmesh.
Thanks for the time and for helping this beautiful community,
Paolo
That was my undertstanding of what you wanted. The script works by disabling camera dragging if you moved the player with the same click - in order to prevent both occuring at the same time.
Detecting a drag input takes a frame longer than detecting a movement click - because the movement click is detected on the "down".
You could try overriding the InteractionA input detection to have it only detect "up" clicks:
This'll only have an effect when using Mouse And Keyboard input for now, but see how you go with this first.
Thanks Chris but don't work fine.
When i click on navmesh the player move 1 click every 10 in random mode.
I've tryed to put a Debug.Log here:
bool CustomGetMouseButtonDown (int button)
{
if (button == 0)
return Input.GetMouseButtonUp (button);
Debug.Log("clicked");
and on console i get many many log very fast.
I don't understand.
Try this:
Yes, Chris. Many Thanks. In this mode work fine.
The problem is when i left the mouse button down the player go to this point.
Probably there is a method to cancel the click on navmesh after 1 second so if i drag the camera for 1 or 2 second the click on navmesh is cancelled when i left the button.
I'll search this method on the web and i'll come back if i'll find it.
Many Thanks for the time and the support.
Paolo
It sounds like you have very specific behaviour in mind. You can cancel the player's movement at any time with:
Thanks, Chris. Have a good new year!