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 - cmonroy

Pages: 1 [2] 3
16
PlayMaker Help / Re: Mixamo/general animating
« on: November 03, 2014, 11:33:03 AM »
Mecanim animations are controlled via an animator controller using values to determine which animation to play when. Playmaker provides some custom actions to manipulate those values directly. For instance, if you have your animator controlling the motion of your character using two variables: speed and direction, Playmaker can put values into those variables. It quite simple once you have your animator FSM ready.

There is a tutorial scene at https://hutonggames.fogbugz.com/?W1031 for checking how to do this.

Humanoid animations are supposed to be retargetable and as such, they have several adavantages over legacy ones. But having the ability to mix and match animations between your characters can also give you a few headaches... For instance, a basic walk cycle can look awesome in a male character but quite wrong in a female one...

17
PlayMaker Announcements / Unity 4.6 and Canvas Actions?[SOLVED]
« on: November 01, 2014, 06:08:20 PM »
Hi.

I'm playing with Unity 4.6 and its new GUI canvas. Are any Playmaker actions available for this?

Thank you!

18
PlayMaker Help / Help with character controller issues...
« on: November 01, 2014, 02:06:02 PM »
This is not really a problem related to Playmaker per se, but maybe the community can provide me with their suggestions about how to solve it.

Is a simply setup: some skinned mesh with a character controller, a rigid body, an animator controller and FSM to provide the Horizontal and Vertical axis values to the animator in order to produce locomotion. The animations are taken from one of the Unity Tutorials and include a WalkBack, WalkBackLeft and WalkBackRight animations.

I added a Grounded check and noticed that when Walking Backwards, IsGrounded is false and switching between true and false with all other animations. The character mesh is 1.70 meters tall, so its center is at 0.85 meters, and all objects are zeroed and sitting flush to the ground. I hit play and the character jumps up about 5 centimeters, so I move the center of the character controller until the mesh no longer falls trough the plane floor but its feet are touching the ground. This solved the looks, but as the IsGrounded check still is false, the character falls when trying to Walk Back. A capsule collider instead of a character controller gives me the same problem...

I've checked the character meshes and the animations, used others and still have the same IsGrounded problem. Any ideas?

Thank you.

19
PlayMaker Help / Re: 3rd Person Shooter Aiming Help
« on: November 01, 2014, 01:40:54 PM »
Not sure if I understood correctly what is your problem, but having traveled this road I thinl I can provide you with some ideas:

- Coordinates X and Y are easily transformed into your AimDirection and AimHeight. However, you also need another axis to identify how far is the aimed target from the camera in order to specify a point in your scene. If there is any object at the end of your aiming line, everything is cool. If, in the other hand, there is the possibility that your aiming line does not intersect any object at a certain time, most routines are useless. To solve this you need to create a dummy target and position it at a certain distance from your aiming start. Make an FSM to move this target using the values you've got from the Mouse position. This insures you'll always have an object at the end of the raycast. Don't forget to parent this dummy target to your character so its position remains constant regardless of on which direction you move.

- The human player is aiming at the target looking through the camera which has an offset position from the character playing  the aiming animation. Hence, you need to provide your character with a LookAt object which evidently is different from the position (Vector3) and rotation (Quaternion) used by the camera. If you are aiming from your character, a parallelax error will be noted whereas if you are aiming from the camera it will not. The bullet, however, and assuming you are using a firearm will come from your weapon model as the start of its own aiming line and will extend to the postion of your dummy target.

- The distance at which you are going to position your dummy target depends on your game, because the Mouse position plus the target distance will provide you with an angle. If the real target is too close or too far away, you may miss it because the angle between your real target and your dummy target are too different.

Once you have solved this,  your have:

- An origin position and rotation
- A destination position and rotation
- An angle between the origin and the destination

Normalize the angle so the max negative and max positive for the VerticalAim and HorizontalAim are between -1 and +1, and feed this values to your animator FSM, which then could use them to play the correct animation.

Get Axis is for reading your input speed and direction (what makes your character move). When you press any movement key or stick, Get Axis gets its normalized value and hence you can't use them for aiming... If you are controlling something like a turret, you need to feed the Get Axis Horizontal and Get Axis Vertical into other variables which ADD or SUBTRACT some specific value to move your weapon in the intended direction.

20
PlayMaker Help / Re: 3rd Person Shooter Aiming Help
« on: October 30, 2014, 08:39:29 PM »
You could lock the cursor so the aim sight points always at the center of the screen -which is the common case for TPS...

21
PlayMaker Help / [SOLVED] ScreenToWorldPoint Jittering?
« on: October 16, 2014, 07:50:29 AM »
Yes... I also have a mecanim character. The jittering is produced by parenting the main camera to the character (which it was done so as to follow around the player from a fixed perspective). Seems like I'm going to have to create a new FSM to take care of the camera...

Thank you Lane.

 :)

22
PlayMaker Help / Re: ScreenToWorldPoint Jittering?
« on: October 16, 2014, 07:04:36 AM »
Thank you, Lane.

No, I don't use any other input device: just the mouse and the keyboard. I usually do more things in each state, but when things produce unexpected results (as in this case) I tend to oversimplify in order to discard unnecessary clutter.

The original problem is to be able to pick up a World point using the mouse position, but I can't use Mouse Pick because there is not always some geometry to catch the raycast. As such, I use a fixed distance from the main camera to complete the Vector3 (which, by the way changes less than 1% between loops). So, since there isn't any easy way I am aware of to point-and-shoot, I am assuming that positionX and positionY in the screen, plus a fixed-distance point can help me to trace a targeting line, which can be extended to infinity if need be, will intersect my enemies regardless of their distance. When I use the ScreenToWorldPoint function to achieve this end, the input parameters are the correct X and Y coordinates of the screen, then I move a sphere to that precise World Point located 8 meters away from the main camera, but the Y component starts to change randomly and keeps going lower and lower, even if the Y screen coordinate remains at the top of the screen and the Y World component runs towards the negative realm.

23
PlayMaker Help / [SOLVED] ScreenToWorldPoint Jittering?
« on: October 16, 2014, 02:02:03 AM »
I have a simple FSM that reads the Mouse X and Y position at a determinated Z position (ten meters away from the camera). Converting that Vector3 to a point inside the game should be easy when using the ScreenToWorldPoint function, which returns a World Vector3, but for some unknown reason the Y component keeps moving randomly even when the mouse is static and basically it starts to fall down from where the mouse is pointing.

Any idea on how to solve this?

Thank you.

24
PlayMaker Help / Re: How to Fade a Gameobject In and Out?
« on: August 09, 2014, 07:52:33 AM »
You also have a Camera Fade In and Camera Fade Out actions... Both actions only requiere a time value and have a finishing event.

25
PlayMaker Help / Re: Use "next frame event " With another event
« on: August 09, 2014, 07:48:41 AM »
Next Frame Event is used to guarantee that the flow from one state goes to the following one. The error you have is probably due to a bad logic in your FSM: check for an infinite loop, for example.

Having a listener state where you check user input (which has the user pressed) would go to a move left or move right state. In each of those two states, you perform the required action and then return to the listener state, which should do nothing else than listen for the keyboard input.

26
It actually is quite simple to do so...

First, you need to download some Animator Playmaker actions (available in the section Tutorial of this website, of course). Second, you need to adjust the Animator Controller for your character so it read float values between -1 and 1.

When you press the corresponding key to move left, the horizontal axis receives a value between 0 and -1, so you should turn, walk or run left whenever horizontal axis is less 0.  Do the opposite for dealing with move, walk or run right, as the horizontal axis should be receiving a value between 0 and +1 and hence your animator controller should do the left actions whenever the horizontal axis is greater than 0.

Suppose you have animations for moving 45°, 90°, 135° and 180° in each direction: what you need to do in this case is to setup a range for each motion. For example, use 0.3 for turning right 45°, 0.5 for turning right 90°, 0.7 for turning right 135° and 0.9 for turning right 180°, and do the opposite for left motions.

27
PlayMaker Help / Re: 2d grid pathfiding
« on: August 06, 2014, 01:29:17 PM »
There is an indie version of the famous A* navigation algorithm at:

http://www.arongranberg.com/astar/docs/

28
PlayMaker Help / How to select a random transform within a NavMesh?
« on: August 06, 2014, 01:23:32 PM »
Hello.

My scene has a grid of roads, sidewalks and buildings, each in its own layer, and a navmesh for the roads has been defined. I want to randomly spawn cars over the roads only, but for that I need a valid vector3 range or the cars would be spawned all over the other layers as well.

Any idea?

Thank you.


29
PlayMaker Help / Re: Modulo Operator
« on: August 06, 2014, 01:06:51 PM »
Close enough, thank you.

30
PlayMaker Help / [SOLVED] Modulo Operator
« on: August 01, 2014, 03:47:25 PM »
Uh... I was trying to do some math calculations but I couldn't find a mod operator in floats or ints.

Any suggestion?

Thank you.

Pages: 1 [2] 3