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.


Topics - Kubold

Pages: 1 [2] 3
16
Playmaker Help / Is there a way to put comments in FSMs?
« on: March 24, 2014, 03:02:54 AM »
Is there a way to put comments in FSMs, like in Kismet in UDK?
Some brackets or something? I know there are colours, but this is not enough. Other people than the creator can't possibly know what does what without some descriptions.

17
User Showcase / Rifle Animset Pro with Playmaker controller | Asset Store
« on: February 03, 2014, 02:52:43 AM »
Hello!

I'm going to release an animation set for characters with rifles. I've made a controller in Playmaker, to test the animations. Because I had a previous experience in making a rough, dirty controller for Movement Animset Pro, this time, the Playmaker graphs are pretty and optimized. It will be ready as soon as I add sprinting and crouching. Here's what I have so far:

Web Player: http://www.kubold.com/RifleAnimsetPro/RifleAnimsetPro_WebBuild_v1.1/RifleAnimsetPro_WebBuild.html


I'll be releasing the package with animations + mecanim + playmaker controller. It will be pretty much "drag and drop" Player and Enemies with basic AI, to get you started really quickly.

It will also be compatible (same skeleton and poses) with Movement Animset Pro (movement set with empty hands), so if you holster the gun, you can go to exploration mode.

18
Action Requests / Get Signed Angle To Target, but with X axis
« on: January 21, 2014, 02:27:35 PM »
Hey!

I love Get Signed Angle To Target (Get Euler Delta Angle, http://hutonggames.com/playmakerforum/index.php?topic=3027.msg13819#msg13819) action. I use it all the time. Problem is that it only counts angles along Y axis.

The problem is that I want now to get signed angle along X axis (so I can do additive animations for aiming not only horizontally, but also vertically).
I think it should be a minor change in the code, but I can't get it right... I just don't know code.

I messed around with this, it gets SOME angle, but it flips and is not accurate...
Can somebody just correct it or make a new action (preferably, you should be able to choose an axis for counting the angle).

Code: [Select]
// (c) copyright Hutong Games, LLC 2010-2011. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Transform)]
[Tooltip("Get the signed angle around the y axis between the gameObject and a target gameObject. Allow you to retrieve both positive and negative angle. Usefull for example if you want to get the delta angle always clockwise ( positive)")]
public class GetEulerDeltaAngleX : FsmStateAction
{
[RequiredField]
public FsmOwnerDefault gameObject;

public FsmGameObject target;

[UIHint(UIHint.Variable)]
[Tooltip("The shortest Angle. unsigned.")]
public FsmFloat angle;

[UIHint(UIHint.Variable)]
[Tooltip("The signed Angle. This is also the shortest distance.")]
public FsmFloat signedAngle;

[UIHint(UIHint.Variable)]
[Tooltip("The positive delta angle. This means the ClockWise travel to reach the target")]
public FsmFloat resultPositiveAngle;

[UIHint(UIHint.Variable)]
[Tooltip("The negative delta angle. This means the Counter ClockWise travel to reach the target")]
public FsmFloat resultNegativeAngle;


[Tooltip("Repeat this action every frame.")]
public bool everyFrame;


public override void Reset()
{
gameObject = null;
target = null;
signedAngle = null;
resultPositiveAngle = null;
resultNegativeAngle = null;
}

public override void OnEnter()
{
DoGetSignedAngle();

if (!everyFrame)
{
Finish();
}
}

public override void OnUpdate()
{
DoGetSignedAngle();
}


void DoGetSignedAngle()
{
GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);

if (go == null)
{
return;
}

GameObject goTarget = target.Value;
if (goTarget == null)
{
return;
}

angle.Value = Quaternion.Angle(go.transform.rotation, goTarget.transform.rotation);

// get a "forward vector" for each rotation
Vector3 forwardA = go.transform.rotation * Vector3.up;
Vector3 forwardB = goTarget.transform.rotation * Vector3.up;

// get a numeric angle for each vector, on the X-Z plane (relative to world forward)
float angleA = Mathf.Atan2(forwardA.y, forwardA.z) * Mathf.Rad2Deg;
float angleB = Mathf.Atan2(forwardB.y, forwardB.z) * Mathf.Rad2Deg;

// get the signed difference in these angles
float _signedAngle = Mathf.DeltaAngle( angleA, angleB );

signedAngle.Value = _signedAngle;
if (_signedAngle <0){
resultNegativeAngle.Value = _signedAngle;
resultPositiveAngle.Value = 360f +_signedAngle;
}else{
resultNegativeAngle.Value = -360f+_signedAngle;
resultPositiveAngle.Value = _signedAngle;
}

}
}
}

Thanks!

19
User Showcase / Playmaker-Mecanim TPP controller
« on: January 10, 2014, 03:23:06 AM »
Hey, I'm trying to make a controller for TPP games. I have tons of trouble with Mecanim - Playmaker talking to each other. Sometimes the delays for sending the Bools between them are HUGE (couple of updates), so the responsiveness suffers a lot. There is much yet to be done, but it now clearly shows what I am trying to do.

Here's a Web Player version:

http://www.kubold.com/MovementAnimsetProExample/MovementAnimsetProExample.html

20
Playmaker Help / SetAnimatorBool in Unity 4.3.1 - random lag
« on: December 12, 2013, 01:17:40 AM »
Hey!

After upgrading to Unity 4.3.1, my Playmaker-Mecanim setup, that worked ok in Unity 4.2, behaves strangely and it's really buggy. I just use SetAnimatorBool Action in it, nothing more. To put it simple - when I press a button, it changes the Bool, and Mecanim animation should blend to another. In Unity 4.3.1, it happens with a slight lag, right away, or sometimes nothing happens - randomly.

I don't know if that helps, but I did a little test - if I Set Animator Bool to true and then set it to false in one action, Mecanim doesn't even register that (so I guess there is a delay in sending the bool value to Mecanim, but I don't know how big. One Update cycle? Should there be a delay like that?).

I know Unity made changes in Mecanim in Unity 4.3, and Jean's Animator Actions package is no longer working properly.

Question is: is it ALL actions in that package that work bad, or just some? I need to know if SetAnimatorBool Action is still good and I should look for an error in my Mecanim tree, or should I revert to 4.2? Or maybe wait for new Playmaker Aniamtor package?

Kuba

21
Hey!

Is it possible to do a Get Rotation Speed and Rotation Vector Action for non-rigid bodies, similar to GetGameObjectSpeed.cs:

http://hutonggames.com/playmakerforum/index.php?topic=1182.msg4961#msg4961

I need it to transfer the motion from non-rigid body to rigid body. In plain words, I want to be able to throw a rigid-body. The above action works great for adding Force, but I wan't to get the angular speed and vector to also add Torque.

And if there is some another way of doing that please let me know :)

Kuba

22
User Showcase / Malfunction - adventure game demo for Oculus Rift
« on: September 23, 2013, 01:34:45 PM »


This is a very short FPP action/adventure style game for Oculus Rift, made in Unity. You are a guy, who just woke up in his apartment, your wife is in the kitchen making coffee, day like every day in Warsaw. Or is it?...

I thought I should make a small Oculus Rift experience, before I try to add Rift support to the game I'm currently developing. I learned a lot and now, I think it's time to share the result. I wish I could polish it more and more, but I already spent too much time on it, since this was supposed to be a three weeks long side project and I already spent more than a month of "weekends and evenings" on it. Big thanks to my wife Kasia for voice overs! It's in Polish, but you should get the context. Subtitles would actually be a really strange experience in vr. Or would they ;).

I never wrote a single line of code to make this. It was all done with Playmaker.

Malfunction Win:

https://db.tt/LgHJ9fIR

Malfunction Mac:

https://db.tt/DfACpwK7

Malfunction Linux:

https://db.tt/NCthud1g




23
Action Requests / Asset Bundles Actions
« on: July 18, 2013, 09:23:44 AM »
Hi!

I would love to see some Actions to stream Asset Bundles, like:

AssetBundle.Load
AssetBundle.LoadAsync - especially this one :)
AssetBundle.LoadAll


I'm in the point in my project when I need to seamlessly spawn lots of enemies. If I simply go with 'Create Object' and create, for example 40 enemies in 3 seconds, it causes terrible hickups. Actually, any Create Object causes a little glitch.

So far I read that creating and loading AssetBundles asynchronously will fix the glitches (If this is not correct, please tell me how should I do this :)). If there already is an Action like this, please send a link!

Thanks!

24
Action Requests / More Screen Actions - ex. Screen resolutions
« on: June 09, 2013, 12:51:56 PM »
I would like to have 2 actions for Screen, like in the attached jpg.

Screen resolutions
Screen currentResolution - not sure if gets the current Desktop resolution, or the default resolution of Unity Player after launching...

The point is to make a proper ingame graphics options and disable this butt-ugly Unity's "resolution dialog window" before launch.

If there already is an Action for that, please send a link in reply.
Thanks! :)

25
I need help understanding what I do wrong.

I am using GUIElement actions to draw some text and Int labels. Everything runs smoothly, until I try to add a GUI Skin with Set GUI Skin Action. In result, I can see that the skin works, but FPS drops from 60 to 10 and the console says:

Unable to find style " in skin 'GUISkin' Repaint/Layout/KeyUp/KeyDown
UnityEngine.GUIStyle:op_Implicit(String)


It displays this message every update, over and over.


26
Right now you need to make an FSM on an object that will be colliding the specific tag.
I would like to be able to choose the object which will be colliding the specific tag.

For example: Main character has a Capsule Collider and separate small sphere trigger collider for detecting ground collisions. The FSM is on the Capsule Collider. During the jump I want to add TriggerEvent for the ground detecting sphere trigger collider. I would like to do it in original FSM, attached to CapsuleCollider. Instead I have to add another FSM to the ground detecting sphere and turn it on by SendEvent. It would be much simpler to be able to just specify which object the TriggerEvent refers to.

27
I want to make a chase scene in a sidescrolling game. I am controlling one character, and the other character is supposed to chase me (using Move To). If I run fast, the chaser stays behind and goes off screen. And then it freezes, and stops chasing me. If I go back, so it's on screen again, it unfreezes and chases me again.

The chaser is NOT a skinned mesh. It is just an empty object with capsule collider and a rigid body.

I guess Move To action doesn't update the object's translation if it's off screen? The other probable cause is that the rigid body, which is attached to the collider of this empty object, somehow freezes the whole thing, when it goes offscreen maybe?

How can I make it ALWAYS update?

28
Action Requests / Save/load all variables to playerprefs action
« on: November 27, 2012, 04:57:38 AM »
How about an Action for saving/loading all playmaker local and global variables values to disk? It can be totally generic, but it would save a lot of time on making cutstom playerprefs keys and all for let's say 150 variables. Like a savegame, but limited just to playmaker's variables to make it easy.


Example:
Player has variables like: amout of ammo, amount of health, armor, stamina, strenght, speed, max jump height etc. They get changed during runtime. If player hits "save game", the amounts get saved on disk with Save all Variables action. He restarts the computer,  and hit's "load game" - We use actions "Load all Variabls" and then "Load Level".
This would make a lot less thing's to worry about, what's left is player's position on the level, etc.

I know the rest of variables would be saved also (for example Axis values or velocity or whatever), but it would be no problem most of the time. Or solved by choosing the variables that you want to make playerprefs for, or masking the one that you don't want to save).

I'm saying PlayerPrefs is a b**ch, if you don't know how to program, and Playmaker is exactly for people that don't know how to program. Or don't like to program... same thing :)

29
Playmaker Help / Unity 4 - error pause all the time[SOLVED]
« on: November 19, 2012, 10:50:22 AM »
Hey!
I just switched to Unity 4 with the newest Playmaker. What I discovered right away, is that almost every setup that is bigger than 3 (or so) object with 3 state machines gives strange errors. It also pauses the editor. You can't turn off the error pause. It pauses anyway, whether it's on or off.


Most common errors are the ones in attached jpg. (I checked, those make no sense: "Compute mesh inertia tensor failed (...) supply a tensor manually". On every object in the scene, rigid body or not.)

I thought my Playmaker character setup from Unity 3.5 was wrong somehow, so I started doing the character from scratch in Unity 4. Everything was working fine with no errors in editor, until I got to the point when I used SmoothLookAt Action on the head of the character. ERRORS, endless errors and game pauses right away. I deleted the SmoothLookAt, because it worked fine before. Still nonsense errors.

Btw. the game runs fine and smooth if you make a Build. It's just the editor.

30
Action Requests / Raycast with store Hit Point every frame
« on: November 17, 2012, 01:15:53 PM »
Hey, what about this Raycast with storing the Hit Piont right away, every frame? Get Raycast Info doesnt do the trick, since it's just once and gets whatever raycast on scene. I'm trying to do an "invert mouse pick" in TPP game.

Cursor will be actually going in the proper direction. I'm Getting the local XYZ of the object that follows cursor. Then, I'm multiplying Y by -1, and Setting the position of the other Object to XYZ. So far works great, looks like invert mouse. The second Object will raycast every frame... and I need to be able to get hit point every frame, to move the Crosshair to that point. Strange request, but there are still people who like their cursor going up, when they move the mouse down... (but only in game! Menus should be normal)

Actually... Invert mouse option in Mouse Pick action would be even better for this case. :) But still, I'll probably need what I wrote above at some point, to do other things with raycasts, like spawn decals or something.

Thanks!!

Pages: 1 [2] 3