Zapbox golf demo controller contact with ball


#1

Can you help with or show a small demo code on how you got the controller to interacts with the golf ball. The 3d club is longer then the controller so how do you know when the tip hits the ball? And what directions to Sun the ball in after it makes contact from its movement.

I’m liking to make things that depend on where the controller is pointing and how it makes contact with things.

Thanks
Steve


#2

Hi Steve,

We’re not planning on releasing the golf project publicly, though we will look to release the xylophone project, as that has been built with sharing in mind.

The golf club works by placing a triggerRegion at the end of the club and another one on the golf ball. The interaction between the two that makes the ball move was done in code and not something we can share, you’re more than welcome to implement your own physics though.

Thanks,
Mark