View Full Version : Assignment 2

Hello,

I completed my second assignment. For simplicity, I chose to create a world with a combination lock that automatically goes through the combination and then unlocks. The sound at the end is a doorbell because I could not find a sound of a lock click.

The project worked as expected but I really had to play with the number of revolutions to get the dial to stop on the desired numbers -- which was time-consuming. Is there is an easier way to do that or is it all just trial and error?

I have attached the file if you want to check it out.

fourbros

01-30-2012, 01:02 PM

pretty nice:) to answer your question there is an easier way to do that, you need to tun the dial manually and "Capture Pose" then make the dial "Set Pose To" etc. etc. etc. This can also be used for many other things to. :D

pretty nice:) to answer your question there is an easier way to do that, you need to tun the dial manually and "Capture Pose" then make the dial "Set Pose To" etc. etc. etc. This can also be used for many other things to. :D

I knew there had to be an easier way.

I've heard about "Capture Pose" and "Set Pose to" but I think those things will be introduced in the more advanced chapters of the book. I don't want to get too ahead of myself :) I appreciate the advice and will probably use it in the future.

At first glance I thought Alice was a very simplistic graphical programming tool, but as I'm advancing I can clearly see that Alice is actually quite sophisticated with the ability to do a whole lot more.

Mr Kidnapper

01-31-2012, 01:06 AM

Poses are where you rotate parts of an object into a position and save the position so the object can move to it later. It won't be much help for your combination lock thing. In the case of dials, if it was accurately made, you could use math to find the rotation necessary. I don't know what level math you take, so I'm just going to do all of it.

In my school you turn the dial right, left a complete turn, then right again, so if you had combination "8, 4, 9", you would turn the dial 1π radians to the right, 2π+π/2 to the left, and π/2+π/8 to the right. That's 180º right, 450º left, and 112.5º right. Then you divide each of these degrees by 360 to find their Alice equivalents (Because Alice measures in percent decimals.) to get the amount to turn.

By the way, I'm getting the numbers by counting the lines clockwise starting from 0.

x2495iiii

01-31-2012, 02:17 AM

Yeah, we used math too. I think I might have assigned the amount of rotation it took to move one degree to a variable and multiplied that as well.

Both work quite nicely.

Poses are where you rotate parts of an object into a position and save the position so the object can move to it later. It won't be much help for your combination lock thing. In the case of dials, if it was accurately made, you could use math to find the rotation necessary. I don't know what level math you take, so I'm just going to do all of it.

In my school you turn the dial right, left a complete turn, then right again, so if you had combination "8, 4, 9", you would turn the dial 1π radians to the right, 2π+π/2 to the left, and π/2+π/8 to the right. That's 180º right, 450º left, and 112.5º right. Then you divide each of these degrees by 360 to find their Alice equivalents (Because Alice measures in percent decimals.) to get the amount to turn.

By the way, I'm getting the numbers by counting the lines clockwise starting from 0.

I figured there had to be a mathematical solution as well, but as you've just demonstrated, it's beyond my mathematical comprehension. You lost me at radians :)

I do appreciate you breaking it down to a more simplistic level for me though.