Release Claw Demo project

Would it be possible to release the claw demo project? its such a good project to use as jumping off point with the controllers and triggers grabbing items.

Edit: I aware of the ZapboxTriggerExample.zpp (ZapBox 2.0 and Controller Sliders in ZapWorks Studio ver 5),
but I hoping for a demo project that illustrates grabbing an object with the trigger.

2 Likes

I 2nd that!!

Steve

I love that demo too. That content shows that it is possible to do with triggers and TriggerRegions, but the required coordinate system transformations are not particularly easy to explain or to map to our current “position, scale, 3-axis rotation” parameters. The xylophone example where the stick changes from being relativeTo controller to relativeTo world covers similar ground.

There are some improvements in TriggerRegion coming in the next app build, mainly around removing the frame delay when your trigger is on the controller and the TriggerRegion is on the world. I’m also thinking about adding in some more useful utilities for these full coordinate system conversions that are required, and then I had that content in mind as something that could be re-written to use that new functionality to demonstrate how easy that would make those kinds of demos.

Until then I’ll see if we can share the current zpp, but I didn’t write it so I’ll need to catch up with the author of that one and see how they are to share it in its current state.

3 Likes

Hello @simon
I love that experience too. I want to play with triggers like in that demo.

Is it possible to get that project or some guidance about using triggers to grab and move objects.

I read that you will try to catch up the author to see if you can share it. I think we all love to play with it.

Regards,

John

1 Like

I 2nd that @simon!
If not the whole thing maybe a simple version.

Steve

1 Like

Yup I was just going to post it as-is yesterday but couldn’t find the source zpp, and it was published before ZapWorks started offering them for download. I think I have a copy on my old laptop in the office, so I’ll set a reminder to try and dig it out next week.

2 Likes

You’re the MAN Simon!! :grin:

Thanks
Steve

Oh Yeah! Thanks @simon

John

1 Like

Here you go, enjoy…

ZapBox Claw Game.zpp (315.1 KB)

A few quick notes (big ZapBox news coming soon which is keeping me pretty busy at the moment!):

  • It looks like it only handles the rotation transform to move from world space to controller space and vice versa.
  • The transforms look to all be dealt with as rotation matrices.
  • Rotation matrices between spaces can be built by looking at multiple triggers in a TriggerRegion. Typically you’d have one trigger at the origin of one space, and then separate triggers on the 3 axes. Then by calculating the directions of those axes when you get the positions of the triggers in the TriggerRegion space you can build the columns of the rotation matrix (or could be rows, depends on how the rest of the maths is set up).
  • Rotation matrices are handy for maths as they’re easy to invert (just the transpose) and compose (combine with other ones)
3 Likes

Thank you @simon!!
Can’t wait for the ZapBox News!!!

Steve

1 Like

Oh Yeahhhh! Thanks @simon
Let’s play!

ZapBox News!!! Awesome I am with @stevesanerd can’t wait!

John

1 Like

Hey Hey!!! the new ZapBox design is gorgeous!

@stevesanerd Have you already tried to play with the Claw Game Code?

I tried to emulate it trying to understand how it works. But didn’t work and I can’t find the error, everything seems to be ok. :no_mouth:

Regards,

John