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

Pages: [1] 2 3
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
Share New Actions / Re: Draw Bézier Curve Action
« on: November 07, 2017, 07:40:30 AM »
Another quick update, you can now specify a GameObject variable for the created lineRenderer...

Cheers,

Nick

3
Share New Actions / Re: Draw Bézier Curve Action
« on: October 09, 2017, 02:21:53 AM »
Hey there, updated the two scripts to remove errors in Unity 2017.1, haven't got round to putting them back up on Ecosystem yet since Snipt dissappeared.

Also removed the Snipt links from previous post as they were redirecting to an unrelated Github repo!?

Updated Draw Curve and Draw Spline actions attached...

4
Share New Actions / Re: Draw Mesh Torus...
« on: October 06, 2017, 01:49:33 AM »
Hi there, not too sure what you mean?

I tried the action out in Unity 2017.1 and got an error message due to Mesh.Optimize, you can either just comment that bit out or I've attached a new version with it removed.

Cheers,

Nick

5
Playmaker Tutorials / Re: Simple Object Rotation from Mouse Position...
« on: October 24, 2016, 03:14:47 AM »
Updated the tutorial to include an alternative using DOTween:



Cheers,

Nick

6
Playmaker Tutorials / Re: Simple Object Rotation from Mouse Position...
« on: October 20, 2016, 10:09:07 AM »
Thanks for the heads up! I'll give DOTween a look over and update the tutorial when I get a moment!

Cheers,

Nick

7
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

8
Ah, thanks Alex, that makes sense.

There are apparently command line arguments for setting borderless or exclusive mode when running standalone builds, so I assume there must be some other way of setting it outside of the editor? There doesn't seem to be any documentation I can find though!

I'll maybe leave it for the moment and see if it's updated in a future Unity!

Thanks again,

Nick

9
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

10
Share New Actions / Re: Draw Bézier Curve Action
« on: March 11, 2016, 09:27:53 AM »
I've just updated these actions on Ecosystem/Snipt, they both now include a toggle for destroying the line rendering object on exiting the state...

*EDIT: Removed Snipt links*

Cheers,

Nick

11
Share New Actions / Re: Draw Mesh Torus...
« on: December 07, 2015, 01:47:17 PM »
Should be up there already: https://snipt.net/holyfingers/drawmeshtorus/

Just search for torus and it'll hopefully pop up!  :)

12
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 

13
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 

14
Share New Actions / Re: Draw Bézier Curve Action
« on: September 21, 2015, 06:43:24 AM »
Thanks Jean!

Had to just fix the DrawSpline action there quickly because of a silly copy/paste error, the version here and on Ecosystem both seem to be working now though!

Cheers,

Nick

15
Share New Actions / Re: Draw Bézier Curve Action
« on: September 21, 2015, 04:57:16 AM »
Hey Jean,

Glad you like them! :D

Just signed up for a free Snipt account there now, out of curiosity how does Ecosystem handle updates? Is there anything to be aware of if I put the actions up and then make some changes to them later on?

Cheers,

Nick

Pages: [1] 2 3