playMaker

Author Topic: Camera Rotation Problem [VIDEO] [SOLVED]  (Read 1488 times)

miguelfanclub

  • Full Member
  • ***
  • Posts: 165
Camera Rotation Problem [VIDEO] [SOLVED]
« on: September 10, 2017, 06:25:55 PM »
Hi again.

Im improoving my character movement.
Character is moving 4m in fixed movement and rotating 90ยบ everytime you rotate.
It works perfectly using the keys.

Now Im trying to rotate the character also by moving the camera towards the edges of the screen (i have a tolerance to not to be too intrusive) so the character and the camera will auto rotate and player will be looking again to the center (0.0.0 self)

It works pretty well, but I have annoying behaviour that I cant fix.

I think its related to the mouselook script that the camera has attached.
I can reproduce the bug if I move the mouse while the "auto movement" is taking place. During the movement, "mouselook" is deactivated and I also control that no keys can be pressed, when movement is ended, "moselook" is again activated.

I could be sure if i can totally "disconect" the mouse imput while the movement is happening. Dont know.

In sec 10 you can clearly see what happens, also on 30.

Video Link:
https://youtu.be/ySxyfy1pkcg

Also, the scene doesn work when I build it (i cant rotate at all) so something must be wrong...
Any Idea?
Thanks!
« Last Edit: September 11, 2017, 02:44:14 PM by miguelfanclub »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera Rotation Problem [VIDEO]
« Reply #1 on: September 10, 2017, 11:17:53 PM »
Hi,
A next frame event might be useful after movement ended and before activating the mouse.

But i am not sure as i can't see the ohter fsm/states.

for build, what platform are you building to?
also do you have some Get/Set Properties actions?

miguelfanclub

  • Full Member
  • ***
  • Posts: 165
Re: Camera Rotation Problem [VIDEO] [SOLVED]
« Reply #2 on: September 11, 2017, 02:44:01 PM »
Thanks djay. I was trying to investigate more and I discovered I was calling mouse look twice on an FSM and that was creating the issue. Now it works.

It drove me crazy yesterday after been working on the same stuff for like 15h.

Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Camera Rotation Problem [VIDEO] [SOLVED]
« Reply #3 on: September 11, 2017, 10:10:24 PM »
Hi,
Yeah i know the feeling :)