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

Pages: [1]
1
Share New Actions / ArrayList Get LineRenderer Positions
« on: November 07, 2017, 07:49:19 AM »
Hi there,

I recently put together an action to get all the positions along a Line Renderer curve as an Array of Vector3s, using LineRenderer.Getposition.

It's based on this Get Vertex Positions Action: http://hutonggames.com/playmakerforum/index.php?topic=3982



The yellow spheres here are having their positions set to each curve position every frame... 

At the moment it cycling through the points and adding them to the array, there is a lineRenderer method to get them all at once which I assume would be much more efficient, but I couldn't get it to work!

I've also updated my Draw Curve actions to allow you to specify a Game Object variable for the Line renderer to make it easier to work with this action: http://hutonggames.com/playmakerforum/index.php?topic=11193.msg74970#msg74970

Let me know if you have any thoughts!

Cheers,

Nick

2
Playmaker Tutorials / Simple Object Rotation from Mouse Position...
« on: October 20, 2016, 03:05:19 AM »
Hi there,

I've written up a short, simple tutorial for rotating an object in two, separate axes via mouse input: http://www.holyfingers.co.uk/main/blog/2016/10/19/on-the-turn/



You'll need the GetMouseDeltaPosition action from here: https://github.com/jeanfabre/PlayMakerCustomActions_U4/blob/master/Assets/PlayMaker%20Custom%20Actions/Input/GetMouseDeltaPosition.cs

I've attached the scene as well.

Cheers,

Nick

3
Playmaker Help / Is it possible to set the FullscreenMode from Playmaker?
« on: September 22, 2016, 09:09:48 AM »
Hello there,

I'm trying to make a little action to set the Fullscreen Mode from within a settings menu in my game, this is what I've got so far:

Code: [Select]
using System;
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("ScreenSettings")]
[Tooltip("Sets the fullscreen mode to either Exclusive or FullscreenWindow on various platforms.")]
public class SetFullscreenMode : FsmStateAction
{

[Tooltip("Fullscreen Mode")]
public UnityEditor.D3D9FullscreenMode dx9FullscreenMode;
public UnityEditor.D3D11FullscreenMode dx11FullscreenMode;
public UnityEditor.MacFullscreenMode macFullscreenMode;


public override void Reset()
{

dx9FullscreenMode = UnityEditor.D3D9FullscreenMode.FullscreenWindow;
dx11FullscreenMode = UnityEditor.D3D11FullscreenMode.FullscreenWindow;
macFullscreenMode = UnityEditor.MacFullscreenMode.FullscreenWindow;

}

public override void OnEnter()
{
UnityEditor.D3D11FullscreenMode = dx11FullscreenMode.Value;


}
}
}

I'm having difficulty setting the values, currently getting a "`System.Enum.Value' is inaccessible due to its protection level" error message?

If anyone has any ideas I'd be super grateful,

Cheers,

Nick

4
Share New Actions / Draw Mesh Torus...
« on: December 07, 2015, 01:26:02 PM »
I was searching around for a way to draw and edit a torus in-game and stumbled on this recently necroed thread on the Unity forums: http://forum.unity3d.com/threads/torus-in-unity.8487/

Thought it might be handy as an action:



You can edit the overall radius, the cross-sectional radius and the subdivisions. No UVs yet though!

Let me know if you have any problems or spot any mistakes!

Cheers,

Nick 

5
Share New Actions / Set Game Object as Viewport label...
« on: October 13, 2015, 07:06:41 AM »
Hi there,

I've been re-visiting some of my UI elements this week and thought I'd share my Game Object Label action. It works in a similar fashion to a GUI Label only it uses Game Objects, handy if you're making 3d interface elements, in-scene UI etc.



It takes the world-space position of a target-object and gets the viewport position, then positions a label object at that point at the corresponding world-space including optional offsets.

I've also including some limited functionality from http://wiki.unity3d.com/index.php?title=CameraFacingBillboard#Alternative_Mod so you can have the label align itself with your chosen camera.

Apologies if this already exists somewhere, I'd previously been using 4 or 5 separate actions and a script to achieve the same result and thought this was a bit tidier!

Let me know if you have any problems or spot any mistakes!

Cheers,

Nick 

6
Share New Actions / Draw B├ęzier Curve Action
« on: September 18, 2015, 08:06:31 AM »
Hi there,

Couldn't find an action for drawing a curve anywhere so thought I'd try and put one together...



It's based on the existing Draw Line action from here: http://hutonggames.com/playmakerforum/index.php?topic=3943.0 though it doesn't have quite as many options, I might add them in later on.

The code for defining the curve comes from here: https://en.wikibooks.org/wiki/Cg_Programming/Unity/B%C3%A9zier_Curves

First attempt at making a custom action and I'm not much of a coder so let me know if there's anything that needs fixed/changed!

Cheers,

Nick

7
Playmaker Tutorials / In-Game Quality Settings menu...
« on: June 29, 2015, 03:08:03 AM »
I've recently been working on an in-game quality-settings menu for my game and I've just written up a few pages of process/tutorial. I posted a couple of similar things here a while back and some folks seemed to find them helpful so I'd thought I'd see if this could be of any use as well:

http://www.holyfingers.co.uk/main/blog/2015/06/28/development-diary-12-quality-settings/



It covers setting up some simple buttons using 3d Objects rather than uGUI, detecting mouse/keyboard input and saving/loading using Easy Save.

Let me know if you have any questions or you spot any glaring mistakes! :D

Cheers,

Nick

8
Playmaker Help / Issue with Screen to World Point...
« on: February 05, 2014, 02:42:13 PM »
I'm having an odd issue at the moment with Screen to World Point...

I'm using a sphere as a cursor, it's parented under the Main Camera in scene, if I attach the following script it follows the mouse perfectly no matter what the rotation of the camera is:

Code: [Select]
function Update () {

var screenPoint : Vector3 = Input.mousePosition;
screenPoint.z = distanceFromCamera; //distance of the plane from the camera
transform.position = Camera.main.ScreenToWorldPoint(screenPoint);

}

If I set up an FSM using Get Mouse x/y, passing them to Screen To World Point and then setting the x/y position of the sphere, it works fine if the camera is 0,0,0 but drifts away from the cursor if I rotate it at all?

I've got the scene working by using a combination of the above script and various FSMs but I'm just curious what the discrepancy might be? Anybody else using Screen To World Point in a similar manner and getting better results? Am I missing something obvious?

Thanks for your time,

Nick 

9
Playmaker Tutorials / Simple Inventory System...
« on: August 27, 2013, 09:53:09 AM »
Following on from my last post (http://hutonggames.com/playmakerforum/index.php?topic=4596.0) I've written up a few notes on setting up a simple inventory system:

http://www.holyfingers.co.uk/main/blog/2013/08/27/whats-in-the-box/

Here's a quick video of it in action:


As before I'd love to hear any thoughts or suggestions!

Cheers,

Nick

10
Playmaker Tutorials / Point-and-click Interface...
« on: August 05, 2013, 08:42:56 AM »
Currently working on a graphic adventure in Unity, only started using Playmaker a few months ago but I just finished a quick write-up of how I've implemented a basic point-and-click interface and would love to get some thoughts and feedback...

http://www.holyfingers.co.uk/main/blog/2013/07/31/pointing-and-clicking/

Cheers,

Nick.

Pages: [1]