playMaker

Author Topic: Axis Input Help  (Read 759 times)

ad0mwalker

  • Playmaker Newbie
  • *
  • Posts: 3
Axis Input Help
« on: February 02, 2021, 09:50:02 AM »
Hi all,

I'm currently developing a 3D top down game. In one of my states, when I right click, my character locks on and looks at the position of the cursor. When I press the x or z axis buttons, this updates the animator float values and animates the character based off the blend tree I set up. However the input is from the characters perspective. So if he's facing to the right of the screen and I press "up", he moves forward, and doesn't strafe to the left like you would expect.  I would like the input from the cameras perspective so that up would move and animate correctly based off where the camera is looking. Can any one help in the method of this? This has been an ongoing issue and I just can't seem to figure it out.  :(

This may better describe whats going on
https://pasteboard.co/JMvgBkf.png


Thanks

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Axis Input Help
« Reply #1 on: February 02, 2021, 05:55:50 PM »
Hi.
You probably need to do some parenting (if i understand correctly)

main parent has rigidbody.
then child have mesh.

main parent handles wasd movement
child handles rotation.

ad0mwalker

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Axis Input Help
« Reply #2 on: February 03, 2021, 05:01:07 AM »
thanks for the reply.

I will certainly have a play with that. The current movement though is pulled from the animation so I think it will have its problems. but I will certainly have a play around with that. I may just need to scrap my current movement script and rethink it.