playMaker

Author Topic: Point-and-click Interface...  (Read 4124 times)

holyfingers

  • Playmaker Newbie
  • *
  • Posts: 27
  • 3D-artist and fledgling Unity Dev.
    • View Profile
    • holyfingers.co.uk
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.
Twitter: @holyfingers

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 10936
    • View Profile
    • Email
Re: Point-and-click Interface...
« Reply #1 on: August 06, 2013, 01:36:09 AM »
Hi,

 Excellent! Thanks for doing such detailed tutorial. The way you created screenshots for playmaker fsm is great and clean! I really like it.

 questions:
-- how did you do the mouse white spot and trailing on the video?

-- where can we play a demo?

bye,

 Jean

holyfingers

  • Playmaker Newbie
  • *
  • Posts: 27
  • 3D-artist and fledgling Unity Dev.
    • View Profile
    • holyfingers.co.uk
Re: Point-and-click Interface...
« Reply #2 on: August 06, 2013, 02:40:36 AM »
Thanks Jean!

Thought I might have got a bit carried away with the colour coding, glad it was still legible!

The cursor is a small white sphere with a trail renderer attached, it's updated with the following script which I just grabbed from http://answers.unity3d.com/questions/35005/transforms-position-wherever-the-mouse-is-pointing.html

Code: [Select]
#pragma strict
var distanceFromCamera : float = 10;

function Start () {
}

function Update () {

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

It's not a perfect solution, at the moment I have to manually correct the size of the cursor if I change the field of view of the camera, which is a bit annoying, but it woks for the most part.

There's no demo as yet, I'm hoping to get something playable in the next couple of months though. I'll be using Playmaker in conjunction with 2DToolkit and EasySave2 for pretty much everything, working on the UI and inventory system in the next few weeks so I'll post a similar write up for them when I'm done.

Thanks again Jean!

(Also, thanks for all the stuff you do around here, there's no way I could be making a game without Playmaker and all the help and support in this forum!)
Twitter: @holyfingers

sebaslive

  • Hero Member
  • *****
  • Posts: 504
    • View Profile
    • Frame Tale Studios
    • Email
Re: Point-and-click Interface...
« Reply #3 on: August 07, 2013, 04:00:30 PM »
Great tutorial! Thanks for this it's very well documented and any tutorials with pathfinding are a must have!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20

Follow me @sebasRez

MarkD

  • Junior Playmaker
  • **
  • Posts: 61
    • View Profile
    • Email
Re: Point-and-click Interface...
« Reply #4 on: August 08, 2013, 12:30:07 AM »
I would love to read more about how you're using playmaker for creating an inventory system!  If you wouldn't mind updating this thread when you post that information that would be great!


holyfingers

  • Playmaker Newbie
  • *
  • Posts: 27
  • 3D-artist and fledgling Unity Dev.
    • View Profile
    • holyfingers.co.uk
Re: Point-and-click Interface...
« Reply #5 on: August 08, 2013, 01:41:08 AM »
Thanks folks, glad you found it helpful. Will post more set-ups as I figure them out, writing up processes like this is a good way of keeping me organized!   
Twitter: @holyfingers

holyfingers

  • Playmaker Newbie
  • *
  • Posts: 27
  • 3D-artist and fledgling Unity Dev.
    • View Profile
    • holyfingers.co.uk
Re: Point-and-click Interface...
« Reply #6 on: August 27, 2013, 09:55:35 AM »
Added another post, this time on implementing a very simple inventory system:

http://hutonggames.com/playmakerforum/index.php?topic=4780.0
Twitter: @holyfingers

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3131
    • View Profile
    • LinkedIn
    • Email
Re: Point-and-click Interface...
« Reply #7 on: August 28, 2013, 10:41:42 AM »
Fantastic work! Love it :)

holyfingers

  • Playmaker Newbie
  • *
  • Posts: 27
  • 3D-artist and fledgling Unity Dev.
    • View Profile
    • holyfingers.co.uk
Re: Point-and-click Interface...
« Reply #8 on: August 28, 2013, 12:30:26 PM »
Thanks Alex, glad you like it, will be adding more as I go along! :D
Twitter: @holyfingers