playMaker

Author Topic: How do I make the controller move relative to the camera?[SOLVED]  (Read 2200 times)

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Hey, recently bought Playmaker on the birthday sale but, I'm having trouble.

Using Assets > characters I've imported a controller. Once the camera angle changes, the character is hard to use. I suspect this is because the controls are staying relative to the original camera but not the new camera.

Can someone please explain to me in the most basic way (maybe even point me to an asset) on how I can fix this without having much, if any, coding.

Thank you.
« Last Edit: December 15, 2016, 03:39:26 AM by jeanfabre »

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Re: How do I make the controller move relative to the camera?
« Reply #1 on: November 29, 2016, 08:17:57 PM »
Please I really need some help with this. To explain it better;


If you imagine the main character being directly in front of a camera. The movement works perfectly but let's say that you walk out of view and towards a new trigger which activates a new camera. (Think Resident Evil 1 or Final Fantasy 7/9) now because you're in front of a new camera your controls are still relative to the old one. So pressing left this time is still logically taking you left; only your character may be moving right because it's controls are relative to the original camera and not updating.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I make the controller move relative to the camera?
« Reply #2 on: December 01, 2016, 02:49:30 AM »
Hi,

 So what part of this is done with PlayMaker?

Bye,

 Jean

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Re: How do I make the controller move relative to the camera?
« Reply #3 on: December 02, 2016, 01:02:44 AM »
Wow it's Jean. I feel honored because I've seen you write many tutorials and responses in my Google search. So the part which is done with play maker are the Camera triggers. When my character steps into a trigger Playmaker will set the camera angle to a new one and when I step back it goes back to the old camera.

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Re: How do I make the controller move relative to the camera?
« Reply #4 on: December 02, 2016, 01:08:00 AM »
and the script which is handling the controls is called It's called "Third Person User Control (script)" which you can access it through Assets > Import Package > Characters
Once you import the package, you can drag a file named ThirdPersonController.prefab onto the screen which is in the "Characters/ThirdPersonCharacter/Prefab" folder. This is the controller I'm using and I've just changed my model/animations.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I make the controller move relative to the camera?
« Reply #5 on: December 02, 2016, 01:37:39 AM »
Hi :)

 I see, so yes you are guessing right, the system controls the character using the camera as a reference.

what you need to do is moving the mean camera itself, instead of switching camera, have you tried that? you can still have other cameras to easily setup point of views, but when it comes to do it in game, simply position, rotate the main camera to match another camera ( other camera acts as placehoders basically).

 does that make sense? else, you'll need to dive into the scripts to modify the character controller system...

Bye,

 Jean

nswayze

  • Playmaker Newbie
  • *
  • Posts: 8
Re: How do I make the controller move relative to the camera?
« Reply #6 on: December 02, 2016, 06:01:30 AM »
That's actually a really creative and clever idea. I don't know why I didn't think of it. It was so obvious haha. Thank you Jean. You're a very helpful person. I appreciate the fast reply :) thank you
« Last Edit: December 02, 2016, 06:23:40 AM by nswayze »