Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Rhyuzaky on October 28, 2015, 05:51:25 PM

Title: Add and destroy vertices in Playmaker
Post by: Rhyuzaky 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.
Title: Re: Add and destroy vertices in Playmaker
Post by: jeanfabre on November 09, 2015, 07:34:04 AM
Hi,

 ArrayMaker (http://j.mp/1Oz63XC) 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
Title: Re: Add and destroy vertices in Playmaker
Post by: Rhyuzaky 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?
Title: Re: Add and destroy vertices in Playmaker
Post by: jeanfabre 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
Title: Re: Add and destroy vertices in Playmaker
Post by: Rhyuzaky 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?
Title: Re: Add and destroy vertices in Playmaker
Post by: jeanfabre 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
Title: Re: Add and destroy vertices in Playmaker
Post by: Rhyuzaky on December 26, 2015, 12:11:16 PM
Hello, I wonder if I can use these examples with the playmaker?
Title: Re: Add and destroy vertices in Playmaker
Post by: jeanfabre 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