playMaker

Author Topic: Camera + Movement issue  (Read 92 times)

necrio2

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Camera + Movement issue
« on: May 13, 2018, 07:15:24 PM »
So, I am trying to create movement / Camera system similar to Critical Anniliationhttps://youtu.be/enuVCToxh-I?t=10m25s


I have to mouse pick -- Look at mouse ( rotate player to mouse )

But also keep the camera in a set pos.

Cant seem to get both to work together. Individually, yes. Don't know what I am missing.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12925
  • Official Playmaker Support
    • View Profile
Re: Camera + Movement issue
« Reply #1 on: May 13, 2018, 10:54:59 PM »
Hi,

 yes, the key is to create a hierarchy.

-  have an empty gameobject called "Player Rig"
- you move "Player Rig" using your keyboard, and the camer is following that Gameobject
- as a child of "Player Rig", you have your player, that follows the mouse.

 and that's it.

 Bye,

 Jean

necrio2

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Re: Camera + Movement issue
« Reply #2 on: May 14, 2018, 04:12:23 PM »
Thank you, Jean! Always helpful.

necrio2

  • Playmaker Newbie
  • *
  • Posts: 15
    • View Profile
Re: Camera + Movement issue
« Reply #3 on: May 14, 2018, 06:17:55 PM »

There is one more thing that I need to do.

I need the camera locked to look from only one angle. How would I do that? I checked out the playmaker camera tutorials, but it didn't really cover what I was looking for.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12925
  • Official Playmaker Support
    • View Profile
Re: Camera + Movement issue
« Reply #4 on: May 16, 2018, 12:07:37 AM »
Hi,

uhn, yeah this one will require a custom camera control so that you make sure it stays consistent when you lok and unlock, if you are using the mouse to look at, during the lock, the mouse will move and so if you unlock, the camera will jump to the new location.

you need to experiement with the following:

 get the "Get Mouse Delta Position:" custom action on the Ecosystem, and use that to rotate your camera around, then when you lokc/unlock, your camera will not jump, because it only check for the relative movement of your mouse and not it's absolute position.

 Bye,

 Jean