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

Pages: [1]
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!


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!

PlayMaker Help / Changes in Playmaker getting lost when I hit play
« on: May 23, 2015, 06:28:01 PM »

I'm having a weird little problem here. I have a project that started out life as a Unity4 project, but which I've since brought into Unity5. After doing so I updated Playmaker and am now at Playmaker has been apparently running fine, and I don't have any errors.

The problem: Not sure how frequently, but sometimes when I make changes in the Playmaker editor and then hit play, the changes are lost. You can see it happen in this screen capture:

There I'm going through and removing the word "Canvas" from the Set property names. I edit three of the names and hit play. As soon as the project runs the words Canvas reappear - the changes are lost.

I found mention of something like this here:

But the solution there was to update Playmaker. From what I can tell, I'm currently up-to-date.

Perhaps coincidentally, this state machine was giving me trouble with some Set Properties I've since deleted. These were set to change the Text component of a 3D Text object. It was having so much trouble I tried the new UI > Text in world space instead. That seemed to work better, but then I realized as I continued to work that I was fixing things I could have sworn I had already fixed. :)

It started happening so consistently I caught it in that screen capture.

Another thing I wonder about: This state machine came into this new version as a prefab. Then I decided I'd rather work on a scene object instead of on the prefab, and broke the connection and deleted the prefab.

So maybe a few opportunities for mayhem to work its way in there. But it's been so solid overall that I don't feel like I'm seeing anything mentioned in the Unity5 troubleshooting guide.

Any help or suggestions would be greatly appreciated!


I've been working with Playmaker a fair amount and love it.

I was hoping to get some suggestions as to how best approach swapping objects for a customization interface.

Let's say you have an app that lets you customize a living room. There's a GUI that lets you choose between several chairs - a rocking chair, a recliner, an armchair - for a certain corner. I've found it easy enough to daisychain the object activations in Playmaker, so that a hypothetical "corner chair" button switches between each in turn.

But I'd prefer to have a button for each chair. And when I've tried setting up this kind of functionality, I found things got clunky fast. The only way I could get it to work was to have each button send an "off" command to its own unique list of every chair before sending an "on" command to the chair I want to activate.

I did something like this for a character viewer once, and it got tortuous to add a new character to the mix - every "turn off" list had to be updated with each new character added!

I used to do something similar switching between cameras, but then discovered a camera-cut command that made it so much simpler - just specify the camera to which you want to cut and there's no need to turn off all the others.

This custom Set Visibility command looks like it might be promising:

Especially if it can deactivate objects by tag - I could tag all the chairs with a "chair" tag, and easily turn them all off before activating the specified chair.

But I'm hoping there's an even cleaner, simpler approach to this kind of thing that I might be overlooking, something along the lines of the camera-cut command.

Any suggestions would be very welcome.


Pages: [1]