Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: necrio2 on May 13, 2018, 10:15:24 PM

Title: Camera + Movement issue
Post by: necrio2 on May 13, 2018, 10:15:24 PM
So, I am trying to create movement / Camera system similar to Critical Anniliationhttps://youtu.be/enuVCToxh-I?t=10m25s (https://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.
Title: Re: Camera + Movement issue
Post by: jeanfabre on May 14, 2018, 01:54:59 AM
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
Title: Re: Camera + Movement issue
Post by: necrio2 on May 14, 2018, 07:12:23 PM
Thank you, Jean! Always helpful.
Title: Re: Camera + Movement issue
Post by: necrio2 on May 14, 2018, 09: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.
Title: Re: Camera + Movement issue
Post by: jeanfabre on May 16, 2018, 03: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