playMaker

Author Topic: Add and destroy vertices in Playmaker  (Read 3431 times)

Rhyuzaky

  • Playmaker Newbie
  • *
  • Posts: 32
Add and destroy vertices in Playmaker
« on: October 28, 2015, 05:51:25 PM »
Hello, I'm doing a play minecraft style in Unity with playmaker (without any programming) .Then, after which generate the terrain in the form of cubes,
how do I destroy vertices with arraylist, I tried to remove the index, but whenever an error occurs, so as destroy vertices, and how do I add?
If someone can answer me, I will be grateful.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: Add and destroy vertices in Playmaker
« Reply #1 on: November 09, 2015, 07:34:04 AM »
Hi,

 ArrayMaker has some special actions for this.

you'll have two custom actions dedicated for this
ArrayListGetVertexPositions
ArrayListSetVertexPositions

so you can get the vertices into an ArrayList, work with it, edit positions etc etc and then set it back to modify the shape.

Bye,

 Jean


Bye,

 Jean

Rhyuzaky

  • Playmaker Newbie
  • *
  • Posts: 32
Re: Add and destroy vertices in Playmaker
« Reply #2 on: November 14, 2015, 11:58:04 AM »
I use these actions, however whenever I try to remove an index of Array to destroy the vertex, an error occurs saying I can not change it.
Already tried modifying the positions for x-1 y-1 z-1, however, it seems that the vertices have been moved, was using the get nearest vertices, and iterate to achieve destroy the hub, however it took the vertices of another cube.
Then some action to destroy the vertices?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: Add and destroy vertices in Playmaker
« Reply #3 on: November 16, 2015, 07:44:10 AM »
Hi,

 You need to remove 3 vertices at a time because Unity mesh are made out of triangle faces.

 Bye,

 Jean

Rhyuzaky

  • Playmaker Newbie
  • *
  • Posts: 32
Re: Add and destroy vertices in Playmaker
« Reply #4 on: November 20, 2015, 03:51:01 PM »
But removing the 3 vertices at once.
Remove when an error occurs and the pause project.
How do I get an exact cube in mesh?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: Add and destroy vertices in Playmaker
« Reply #5 on: December 21, 2015, 02:19:47 AM »
Hi,

 fully source code for many primitives on the Unity Wiki:

http://wiki.unity3d.com/index.php/ProceduralPrimitives

you'll have the content of all the various lists to create/edit your cube.


 Bye,

 Jean

Rhyuzaky

  • Playmaker Newbie
  • *
  • Posts: 32
Re: Add and destroy vertices in Playmaker
« Reply #6 on: December 26, 2015, 12:11:16 PM »
Hello, I wonder if I can use these examples with the playmaker?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15501
  • Official Playmaker Support
Re: Add and destroy vertices in Playmaker
« Reply #7 on: January 13, 2016, 02:13:17 AM »
Hi,

 this link is more a way to verify your setup. look at the various arrays definition so you can spot the difference with your listing.

The scripts of that link works without PlayMaker, they simply are new primitives, however, good knowledge of c# is expected to work with these scripts.

Bye,

Jean