playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Adam Z

Pages: 1 ... 9 10 [11] 12
151
PlayMaker Help / Re: Playmaker rotation help please...
« on: January 09, 2013, 02:10:27 PM »
Hi,

 don't use iTween for this type of commands, that's not really possible, itWeen works with hardcoded end values as target, here the target is always changing.

simply react to the A and D key and use the "rotate" action. You can tweak the input preferences to have some smoothing in the axis itself. If you want to do the smoothing, you can insert a small lerping action between the raw input and the rotation delta value. I created a custom action for lerping floats.

Try the example attached and see how I created it. Remember that it is using a custom action I wrote for the smoothing, but you don't have to use this.

bye,

 Jean


Where did you assign the left and right arrow keys within your attached example?

152
PlayMaker Help / Re: Camera Zoom In and Out...
« on: January 09, 2013, 01:56:44 PM »
Hi,

 no, that would be too easy :)   ;D

I created two events, both checked to show up in the inspector, so if you scroll down to view the playmaker fsm component, you will see two buttons  "HEAD VIEW" and "MAIN VIEW" in the "playmaker fsm script" component,

else you can right click on the states inside the editor to trigger them

bye,

 Jean

jeanfabre, after looking at your attachment I noticed that you have the 'START VIEW', 'CHEST VIEW', and 'HEAD VIEW' with states attached. How did you create those dark gray Event boxes all in the same FSM editor window? I wanted to add another, but for the life of me I cant figure it out!

153
PlayMaker Help / Re: Playmaker rotation help please...
« on: January 09, 2013, 01:32:36 PM »
Hi,

 don't use iTween for this type of commands, that's not really possible, itWeen works with hardcoded end values as target, here the target is always changing.

simply react to the A and D key and use the "rotate" action. You can tweak the input preferences to have some smoothing in the axis itself. If you want to do the smoothing, you can insert a small lerping action between the raw input and the rotation delta value. I created a custom action for lerping floats.

Try the example attached and see how I created it. Remember that it is using a custom action I wrote for the smoothing, but you don't have to use this.

bye,

 Jean


You da man!

Thanks so much for all your help. I just got my feet wet with PlayMaker, so I have a lot to grasp and understand with the "programming" side, and all of their Actions!  I owe you one... :)

154
PlayMaker Help / Re: GUI Scale Object Help
« on: January 09, 2013, 01:10:11 PM »
Hi,

 odd... are you sure you are setting up all axis? maybe the parent of your gameObject doesn't have a uniform scaling to begin with?

bye,

 Jean


I have no idea why it was doing that. Since the scene was very simple trying to get the functionality to work, I just redid it and now it works fine. Thanks again for all your help!

If you'd like to help me with my rotation problem in another post, I would certainly appreciate it!   ;)

155
PlayMaker Help / Re: Camera Zoom In and Out...
« on: January 09, 2013, 12:30:43 PM »
Hi,

 no, that would be too easy :)   ;D

I created two events, both checked to show up in the inspector, so if you scroll down to view the playmaker fsm component, you will see two buttons  "HEAD VIEW" and "MAIN VIEW" in the "playmaker fsm script" component,

else you can right click on the states inside the editor to trigger them

bye,

 Jean

Thanks so much!

156
PlayMaker Help / Re: Camera Zoom In and Out...
« on: January 09, 2013, 12:19:31 PM »
Hi,

I would recommend the following ( see working package attached)

 Have two empty gameObjects, representing the position and rotation of the camera. One when zoomed out, and one when zoomed in close to the face.

 Then use iTween to move the camera to one of these dummy, and done, you will also benefit from nice easing to have smoothed out camera movement.

 Does that make sense? to place the two dummies, you can do that easily during editing by moving the scene view exactly like you want, then select the dummy and go to the menu "GameObject/Align with view" and done :)

In your case, you will likely have to set up a constant look at for the camera and only tween the position of the camera, AND the position of the look at ( you animate the gameObject the camera is looking at, following the head or tweening back to the central body). Use smooth look at to obtain nice camera movement.

bye,

 Jean

The attached package doesn't seem to have any buttons or key events to allow me to test it out. But I'll look over what you came up with and Im sure it will help. :) Thanks!

157
PlayMaker Help / Re: GUI Scale Object Help
« on: January 09, 2013, 12:15:05 PM »
Im not sure why it's doing that. I parented another cube to yours and your still scaled correctly.  I even turn off all my other FSM's to see if there was a conflict of some sort, still nothing...

158
PlayMaker Help / Re: GUI Scale Object Help
« on: January 09, 2013, 12:08:45 PM »
Hi,

 Gui slider actions have a left and right value, so you simply set the left value to the smaller scale, and the right value to the bigger scale, and you preset the slider knob value to 1 when you begin, that's about it. then you use the "set scale" action and inject in x, y z the slider value.

I have attached a working scene. Tell me if that's what you aim for.


Bye,

 Jean

Your example works great, thanks!  My character is still squashing though. Could it be because I have other objects parented inside it?

159
PlayMaker Help / GUI Scale Object Help
« on: January 09, 2013, 11:41:20 AM »
Im creating a slider to scale my character. 

I have a Scale (Float) Variable.
I have a GUI Horizontal Slider with Scale in the Float.
I have a Set Scale with Scale in the Float for X, Y and Z.

When I play it the object is at a 0 in size (XYZ), and when you slide the slider to the far right the object is at a .4 (assuming 1 would equal the normal size).

Any thoughts as to how I set it up so the object starts at the normal size of 1, the slider nob is in the middle, and you can scale it in either direction (left for smaller/right for larger)?

Any help would be appreciated! Thanks.

160
PlayMaker Help / Re: Camera Zoom In and Out...
« on: January 09, 2013, 10:20:33 AM »
From what i'm aware Set Property will do this for you.

If you haven't used it before make sure you Lock the FSM you're working with and drag the camera component into the field.

Best of luck :)

Thanks for the suggestion, but Im still having a hard time trying to figure out how that works.

161
PlayMaker Help / Camera Zoom In and Out...
« on: January 09, 2013, 08:30:52 AM »
I'm designing a character creator. I would like the user to hit a key and the camera will zoom to the head, and when you click another it will zoom back out to the body.

I have two 'Empty Game Objects'; one for the head and one for the body. Those 'Game Objects' are parented to the main character, that way if I allow the user to scale the model those will also scale as well, that way I dont have to change the position of those.  I have an 'iTween Look To' to allow the camera to focus on each game object. That works fine.

I'm having difficulty figuring out the best way to create the zoom ability.  It needs to translate in both the Y and Z, as well as change the rotation slightly. What would be the best action to accomplish those? I thought about using the 'Get Camera FOV' which would work, but I can't figure out how to animate that giving a nice ease in and out depending on what you're looking at. I was thinking about using the 'iTween Move To and From' but those have me confused.  I dont want to give it a fixed numeric for the translate and rotate, since that would cause issues if/when the character is scaled.

Thoughts?

162
PlayMaker Help / Playmaker rotation help please... [SOLVED]
« on: January 09, 2013, 07:35:37 AM »
Im new to playmaker and I'd like to to rotate a GameObject around the Y axis, having the 'A' and 'D' keys determine the rotation (left/right). I have no problem setting up the keys, but the iTween rotations confuse me. What I would like to do is that when you press and hold the 'A' key, the object begins to slowly rotate left until it gets to it max rotation speed, and when you let the 'A' key go, it will slow down with a smooth transition, instead of just stop abruptly.

I tried the 'iTween Rotate By' action. That sort of works. I have it store the rotation in a Vector3, with an Ease In Sine. But when it completes the full 360 degree revolution it stops, pauses and starts again instead of continuing to rotate until I let go of the 'A' key. It seems to be the Ease Type. When I choose Linear it keeps looping. Is there another setup to allow for an Ease In when pressed, and Ease Out when de-pressed?

Derkoi suggested using' iTween Rotate Add' instead. Do I need to include something for the Events, or leave that blank since it won't rotate at all?

Thanks!

163
PlayMaker Help / Re: First person character controller help
« on: October 15, 2012, 08:39:06 AM »
If you wouldnt mind coding it for me so I can see how you set it up, that would be great! Im still new to scripting, so reverse-engineering what you set up would definitely be helpful! What's the easiest way to package up my scene for a smaller file size?

164
PlayMaker Help / Re: First person character controller help
« on: October 15, 2012, 08:35:11 AM »
eh so you first enable and disable the camera look around script on the torso of your character, right? then when it's disabled you want it to snap back to its' original position? I get the x and y rotation (get rotation) of your torso object and use set rotation on every frame. then use ease float to ease the rotation values from whatever the camera look around script made them to 0 . (or whatever it first was. since it's in a hierarchy (hopefully!) it should always be the same local rotation) .

If this doesn't help you could send me a scene file (PM) and I'd do it for you, whatever it is you need :)

Right now when you click and hold the middle mouse button, you're able to look freely with the torso rotation, allowing you you move forward, backward, and strafe independently of where you're looking.  When I un-click the middle mouse button it stays at the current position. What I would like is that when you release the mouse button, it will snap back to the Z direction, so when you press the forward button you'll be looking in that direction.

165
PlayMaker Help / Re: First person character controller help
« on: October 15, 2012, 06:35:03 AM »
Anyone? :)

Pages: 1 ... 9 10 [11] 12