Thursday, December 12, 2013

Pinball Masters, Prototype #4

I have finally gotten my flippers working in Unity! It took a while, and after trying "Lerp"ing and "Slerp"ing (and maybe even a little twerking!?), I found a YouTube video from PushyPixels that simply utilized "rotateAround".  Since I am working in JavaScript, variable declaration was done a little differently, but nothing too difficult to figure out. The next issue I had was that they were using the mouse as a controller, and I wanted to use "D" for the left flipper and "K" for the right flipper, so I gave the object tags, and paired them with the GetKeyUp and GetKeyDown events. Finally, I stopped watching at the point in the video where they were still struggling with trying to get the left flipper to move correctly. I simply utilized their script, changing the positive/negative values on "maxAngle" throughout the code for the left flipper, and it worked swimmingly.

So here it is, prototype number four

And if you would like to check out the video by PushyPixels, you can find it here.

No comments:

Post a Comment