Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ItzArranT on July 06, 2017, 06:49:05 AM

Title: "Slicing" a shape in Playmaker
Post by: ItzArranT on July 06, 2017, 06:49:05 AM
Hey all,

As a spiritual successor to a previous post of mine ('Re-creating the gameplay of "Calmfall") I was curious if anyone had any ideas on how to go about re-creating a mechanic similar to Fruit Ninja's "fruit slicing".

Essentially, the functionality would involve:

1) Observing a geometric shape from a 2D perspective.
2) Tapping the screen and dragging your finger to draw a straight line across that shape.
3) Lifting your finger to finish drawing the line and "set" the cut.
4) The cut affecting the shape accordingly (i.e. sliced in two).

I realise this is probably highly complex but I was curious if such a mechanic could be achieved in something like Playmaker.

Thanks all.
Title: Re: "Slicing" a shape in Playmaker
Post by: djaydino on July 07, 2017, 05:48:39 AM
Hi, i think it is best to get an asset like sprite slicer (https://www.assetstore.unity3d.com/en/#!/content/12911)

If you want to use this let me know and i can make a custom action for this.
I do not have the asset but i believe it is only a single line for the script and it is in the video so it won't be hard to make this.
Title: Re: "Slicing" a shape in Playmaker
Post by: ItzArranT on July 08, 2017, 05:32:49 PM
Hi djaydino, thanks for the response and sorry for the late reply- in the middle of moving!

Thanks for the great recommendation re Sprite Slicer- do you know if this handles colliders also?

An action for it would be amazing :D
Title: Re: "Slicing" a shape in Playmaker
Post by: djaydino on July 09, 2017, 12:00:39 AM
Hi.

Here is the action.

Be sure to make a backup of your project before importing this.
I can't test this, as i do not have the asset.

Install the asset before importing the action

Please let me know if it worked.