playMaker

Author Topic: Vectrosity Headache!  (Read 2635 times)

alfiebooth

  • Playmaker Newbie
  • *
  • Posts: 3
Vectrosity Headache!
« on: January 24, 2014, 01:15:06 PM »
Hi, Hope you guys can help as this is pickling my tiny mind.

all i wish to do is be able to make a spline created with Vectrosity visible\invisible through a button with an FSM on it.

I have the Vectrosity actions, but am completely stumped about how to access the line so I can disable it. Looking through the forums I've seen the Vectrosity.AddProxy, but I have no Idea how to implement this and make it usable. For instance in the Vectrosity demo scene, the 'makespline' script:

Code: [Select]
import Vectrosity;
import System.Collections.Generic;

var segments = 250;
var loop = true;
var usePoints = false;

function Start () {
var splinePoints = new List.<Vector3>();
var i = 1;
var obj = GameObject.Find("Sphere"+(i++));
while (obj != null) {
splinePoints.Add(obj.transform.position);
obj = GameObject.Find("Sphere"+(i++));
}

if (usePoints) {
var dotLine = new VectorPoints("Spline", new Vector3[segments+1], null, 2.0);
dotLine.MakeSpline (splinePoints.ToArray(), segments, loop);
dotLine.Draw();
}
else {
var spline = new VectorLine("Spline", new Vector3[segments+1], null, 2.0, LineType.Continuous);
spline.MakeSpline (splinePoints.ToArray(), segments, loop);
spline.Draw3D();
}
}

How would I go about making this spline available to the playmaker actions?

Sorry in advance for my coding incompetence.. hence my love of playmaker!!

thanks,

Alfie

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Vectrosity Headache!
« Reply #1 on: January 27, 2014, 05:03:06 AM »
Hi,

Simply get the gameObject in the hierarchy, you can enabled disable the gameobject itself.

 PlayMaker actions use a special proxy that makes vectrosity shapes "not" generated with playmaker not visible to these playmaker actions.


bye,

 Jean