playMaker

Author Topic: How to set up smooth look at for mobile!  (Read 127 times)

volcank

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
How to set up smooth look at for mobile!
« on: May 11, 2018, 04:46:26 AM »
Hi everyone,
A real begginner here. I searched for the topics but couldn't find the answer. I managed to create a control system for 2.5 D game which my character goes left and right and jumps which I can control with A,D and Space keys naturally. I also created a smooth look action which is really cool and makes the character turn to the direction he walks to. But somehow I can not make this process for mobile. naturally for the gameplay for a regular computer I get axis and velocity so the player can look around smoothly. But for mobile I use translate advanced and smooth look and stilll no chance. Please check the screenshots. I would appreciate your help.

Thank you

Volkan

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12925
  • Official Playmaker Support
    • View Profile
Re: How to set up smooth look at for mobile!
« Reply #1 on: May 11, 2018, 06:51:54 AM »
Hi,

 can you make a screenshot of the whole actions tab, I am not sure how youhave setup the advanced translate.

 basically, you should move your character during update and have your camera follow during late update.

 Bye,

 Jean

volcank

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: How to set up smooth look at for mobile!
« Reply #2 on: May 11, 2018, 07:03:31 AM »
Hi Jean Actually I was mentioning the smooth look at the player to the direction it is going to. So I used Advanced Translate 2 on the player to make it move while using pointer down action on the buttons and I also solved the situation by using iTween Rotate to. So I set the player rotate -90 or 90 when you touch arrow right or left. Please check the attachments.

Only one problem I have it I have to keep on touching the button in order to make the player rotate to fully to the position he/she is going to. What would be best approach to make it turn to 90 or -90 once we touch the buttons? Thank you!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12925
  • Official Playmaker Support
    • View Profile
Re: How to set up smooth look at for mobile!
« Reply #3 on: May 13, 2018, 11:32:16 PM »
Hi,

 you need to have a dedicated fsm for turning, and from your controlling fsm, you send an event to that rotate fsm that will then be free to rotate in its own time without having to switch to another state to do something else.

 Bye,

 Jean

volcank

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: How to set up smooth look at for mobile!
« Reply #4 on: May 14, 2018, 07:17:54 AM »
Hi Jean,

So how do I make the dedicated FSM I am actually farily new to Playmaker. Can you give an example or tell me which action should I use as a start up to send events to the rotating action. Thank you

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12925
  • Official Playmaker Support
    • View Profile
Re: How to set up smooth look at for mobile!
« Reply #5 on: May 15, 2018, 11:58:13 PM »
Hi,

 To be honest, you should use CineMachine, there is no point in trying to do something that is achievable using CineMachine, have you tried?

You keep PlayMaker dealing with your character, bu you completly rely on Cinemachine for the camera control, you will be able to create very nice camera behaviour (check out their examples to get a glimpse)

Let me know if this is a viable option for you.



Bye,

 Jean