Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: trsnell on March 19, 2012, 01:47:34 AM

Title: Freeze camera (on pause) [SOLVED]
Post by: trsnell on March 19, 2012, 01:47:34 AM
Just finished making a pause menu for my game (which is first person), but I'm having trouble figuring out how to freeze the camera when the player pauses. Right now I'm setting the rotations to zero, which does freeze it, but of course it snaps the camera to the zeros rather than keeping it in place. I thought about trying to store the rotations of the camera as variables and snap to those, but it seems like there could be a simpler way of doing it... Anyone know of anything?

Edit: Just remembered the sound as well.. is there way to pause all audio, or would I just have to turn off the audio listened in fpc? Can you access specific components of a game object with playmaker? That would solve my first problem as well, because then I could just turn off mouse look.
Title: Re: Freeze camera (on pause)
Post by: justifun on March 19, 2012, 06:28:53 PM
You certainly can.

Choose the action "set property".

Then from the inspector of your selected game object (or whatever object has the mouse look on it in this case), drag the name of the component (eg: mouselook) into the "object" section of the action.

Then from the drop down named "property" you can pick from a list of items that you can adjust there.

If you drag mouselook into there, you will see a few items such as sensitivity.  However you want to go down to "inherited" and in the sub flyout menu you will see "enabled" which is probably what you are looking for.

Make sure bool is unchecked (off)
and then repeat this process by copying this action onto your resuming state, and put a check in the bool checkbox to enable it again.

give it a shot and let us know how it works out for you.

cheers.
Title: Re: Freeze camera (on pause)
Post by: trsnell on March 20, 2012, 12:44:58 PM
Awesome, thanks! Works perfectly. Been wondering how to access components for a while, this is going to be really handy.
Thanks again, justifun!