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

Pages: [1] 2
Playmaker Help / Re: Sound stops working after a few plays
« on: January 18, 2017, 04:50:17 PM »
Pretty sure we're not messing with timescale, but I'll keep it in mind. Thanks!

Playmaker Help / Re: Trigger sound when objects crash into each other?
« on: January 18, 2017, 02:48:36 PM »
This person seems to have basically the same soundfx need:

That question's answer leads to this bit of script reference:

Not entirely sure how to implement this (yeah, even with the reference, I can be kind of a dunce about scripting), so I guess the question is how might I go about doing this in Playmaker?

Playmaker Help / Trigger sound when objects crash into each other?
« on: January 18, 2017, 02:21:11 PM »

I've got a scenario in which a flowerpot gets knocked off a ledge and crashes to the ground far below. The flowerpot has a collider and rigid body, and the ledge and ground have colliders. The fall and physics work fine. I might eventually make the flowerpot explode upon colliding with the ground, but the most pressing problem at the moment is that it doesn't make a sound when it crashes.

Any suggestions on how to make this work? I suspect it has something to do with either the Collision Event action or the Get Collision info - some way of detecting the force of an impact and having that trigger a sound.

I can't of course have it make a sound when it's simply in contact with any other collider, because that would make it so the flowerpot sliding along the ledge before falling would make a crash sound. :) Unless, I suppose, I used tags to distinguish the ground and ledge...

Anyway, seems like a more direct solution that detects a magnitude of force must be available.

Any help would be greatly appreciated! 

Playmaker Help / Sound stops working after a few plays
« on: January 18, 2017, 01:41:25 PM »

This may or may not be a Playmaker-related issue; it's certainly keeping Playmaker from working, but I'm not sure if Playmaker is the cause.

We have  an app which involves various real-world scenes with various background noises. Typically I set up the looping ambient sound by dragging a sound file into the hierarchy and making sure it's set to play upon awake and loop. Then my Playmaker events - a sort of tour through the space - happens, and that's all been working well.

Until, that is, we added some more sounds, voice-over triggered within the same Playmaker state machine. These are triggered via Audio Play actions, that specify a game object near the user camera on a child object of an OVRCameraRig, this being an Oculus Rift walk-through. The game object has an Audio Source component on it.

The first time we run through this tour via the editor, it works fine - all sounds are present. After one or two more times, however, the sound will fail to start upon hitting play. By which I mean all sound, background audio as well as voiceover.

And it's not just a lack of volume, the sounds are failing to play: looking in the state machine you can see it get to to the state containing the Audio Play action, and it's stuck there - apparently unable to complete because it can't play the sound it's supposed to play.

The only way I can get sound to work at that point is to restart Unity.

The tour is a sequence of scenes that begins with an intro scene and the rest are daisy-chained together via Playmaker; apparently the overall demo works OK when played this way, it's just repeated starts within the editor that causes the sound to quit.

I did one time get some audio to come back to life by somehow forcing the state machine to continue to a later stage - at that point a later bit of voiceover started playing. But that's not a practical solution for the tour, and besides the background audio never came back on.

This is happening on my machine and a co-worker's. I'm an artist and the co-worker is a coder, and he has concluded it's a Playmaker issue. Certainly it's keeping Playmaker from doing it's thing. For my part, I'm open to the possibility that it's a general Unity issue that's causing it, but I enjoy using Playmaker extensively enough that I skew toward not wanting to see it blamed for problems like this if I can help it. :) The less it's blamed for, the more likely we are to keep using it.

I've searched around online a number of times and haven't found anyone having issues along these lines.

Any help would be greatly appreciated!

Share New Actions / Re: Itween move to with exisiting paths
« on: November 18, 2016, 02:15:45 PM »
A month later, and I finally got a chance to install Ecosystem and give this fix a try. It worked! The errors seem to be no more.

Incidentally, I mentioned not being able to get the plane to orient itself to the path, despite having "Orient to Path" checked. I found the answer to that problem here:

...where courtneyrocks says:

You have to include a Look Ahead value. I think this determines how far ahead on the path the object is looking. I ended up using a a value of 0.001 and it finally works as it should.

Vitally important info, IMO. Obviously it's more an issue with itween than with Playmaker, but on Playmaker's side, in the tooltip for the Look Ahead value, which currently says you can enter a value between 0 and 1, it would be really helpful if it mentioned that 0.001 is a good value to for getting the object to orient to a path without any derivation - the way I would think most people would expect it to work.

Normally I can just trial-my-error my way into figuring something like that out, but I tried 1, then 0, then .5 then .3 ... None of them came close to working. With 0 having not worked, it didn't occur to me that a tiny fraction higher (.001) would work perfectly.

Thanks again!

You have to include a Look Ahead value. I think this determines how far ahead on the path the object is looking. I ended up using a a value of 0.001 and it finally works as it should.

THANK YOU. To my mind, expected behavior for "Orient to Path" should be, you know, orienting to the path, not skidding around looking at who knows what, as seems to be the default. Been banging my head on the wall for half a day trying to figure this out, first with the iTween Visual Path mentioned here:

...and then with the more standard path, added via game objects as Path Nodes. Neither came close to working until I entered the magic number .001 into Look Ahead.

The Look Ahead tooltip should include .001 as a suggestion for getting Orient to Path to work correctly (or what I think of as correctly).

Share New Actions / Re: Itween move to with exisiting paths
« on: October 19, 2016, 02:39:59 PM »
Hello! I realize this is an old thread, but it still seems to be the most relevant.

I tried using the action originally posted at the start of this thread, iTweenMoveTo_v2.cs, but I got the error:

Assets/PlayMaker/Actions/iTweenMoveTo_v2.cs(66,38): error CS0115: `HutongGames.PlayMaker.Actions.iTweenMoveTo_v2.OnDrawGizmos()' is marked as an override but no suitable method found to override

To get to where I could run in game mode, and not being sure what else to do, I commented out lines 66-78. That at least let me run, but I'm not sure what else I might have broken in the process. The object I'm trying to animate, a plane, does follow the path - and that's a relief - but it's not orienting itself along the direction of movement. Not sure if that's related.

Greatly appreciate the custom action, any further help would be most welcome.

User Showcase / Re: Spell Fighter (100% made with PlayMaker)
« on: May 22, 2016, 07:34:03 PM »
A while back I downloaded this game for the Vive, and played it a bit with my kid - awesome work! Just came here to learn how to make the Vive controllers work with Playmaker; pretty inspiring to see you managed a whole game. Thanks for the controller tips!

User Showcase / Re: Modular Traffic [Asset] [Coming Soon]
« on: May 27, 2015, 08:29:57 PM »
This looks really cool, and very applicable to work I'm doing. Looking forward to it!

Hi Jean,

I think it's simply because you forgot to actual set the position of the line. You do that in the first state, but you don't in the state where you animate the float.

That did the trick! (And I ended up going with an Ease Float as mdotstrange suggested.) Thanks for assuming that I started off with enough knowledge for this to have been a case of forgetfulness. :) But it actually never occurred to me that I'd have to put a Set Position in the second state. I figured with it having been set to update every frame in the first state, and then with the float interpolating in the second, that Position would just keep updating. But I guess when you move to another state, you can't expect other states to remain in effect. Again, I'm plowing into this will a severe lack of basic coding knowledge, which tends to obscure what should otherwise be obvious.

Thanks very much for your help!


iTween was going to be my fallback if I couldn't animate the float. But the point of animating the float was to make the movement accessible via both the slider and the button-press - iTween can't do that, can it? It seems as if iTween operates on a vector variable, but I don't see a way to access that via a slider.

I suppose I could do something like a Set Vector 3 XYZ and have the X variable I'm trying to animate in the X slot... That would take some experimenting though; a little more than I can get my head around in the abstract just yet. :)

If there's a way to use iTween to animate the float, that would be great.

Or even better, if I could just Ease Float or Float Interpolate to work the way I expect.

Thanks again!

Hi there,

Thanks very much for the replies.

The prefab thing could perhaps be an issue. It's not a prefab, but as I mentioned in my original post, it started out as one. But soon after I imported this old Unity4 project into Unity5, I kept trying to work on the instance. I couldn't remember why I even bothered making it a prefab back a year ago when I had last opened it. It was a pain click on the game object only to realize I was supposed to be editing the prefab instead, and I definitely wasn't going to change the settings to let me work on the instance while there was a prefab in existence. So I did a "break prefab instance" and deleted the prefab, then continued to work on the instance.

For this and other reasons I've mentioned in another post, I might just start over to make sure everything's clean after reinstalling Playmaker itself.

Thanks again!

Thanks very much for the response! Unfortunately Ease Float was one that I had already tried, with similar results. Here's a quick look at and description of how it plays out:

Pretty much the same problem as with Float Interpolate - the object just pops over after the set movement time instead of smoothly moving over the course of that time, as I would hope.

But it sounds at least like you're not seeing any other fatal flaws with the setup, is that correct? Because if that's the case I might just scrap this state machine on the assumption it got corrupted at some point and start over. It was carried over from an old Unity4 project and had some other issues along the way, so it seems like some flaws could have worked their way in.

Thanks again!


I've got a slider set up to move around an object via a float variable. This works fine, but I'd like to similarly move around the object via set amount of time with the push of a button. Float Interpolate seems like it should do the job, but what I'm seeing is the object pop to the new location a second later (a second being the time over which I'd like to interpolate).

Here's a screen capture video showing my setup, what's working, and what's not:

You'll need to turn on sound to hear my explanatory babbling.

I feel like I must be close and I'm probably missing something obvious. Coming from the art end of things I could easily be missing some basic principle of programming. But I thought I had my head around Playmaker enough to muddle through this sort of thing.

Any help would be most appreciated!

Another update: I continue to have Playmaker edits vanish as soon as I hit play. On the chance that I screwed up installing Playmaker, I followed the instructions here for "How to safely replace an old Playmaker installation with the latest version":

But that didn't fix the problem.

Pages: [1] 2