Hello World! I'm talking about calculating distance in Alice3. I have a movie with an ice skater and an ice floe. What I would like to do is have the skater move next to the ice floe. My initial attempt would be to say, I want the ice skater to move to the ice floe. When we run that, you can see, she's right smack in the middle of the ice floe. the problem is when we calculate something, The distance is from the center pivot point of each of the objects. So the skater move from here to the pivot point, or middle of the ice floe. That's not going to work I'm going to disable that. When I'm experimenting, if I disable something I can look back so I don't repeat something that didn't work previously. When I get all finished, I can delete these. We're going to need to move the skater from here, to here, minus the width of the ice floe. So we need a little bit of math, and we need some variables. My first variable is going to be a double and call this distanceToMove. We're going to give it initial value, it doesn't matter what. And say OK. I'm going to go to functions Procedures are things that happen. Functions give answers. So I'm going to use Ice skater.getDistanceTo some other object, and drag that and replace that .25 and I want the distance to the ice floe. So the distance to move is the ice skaters distance to the ice floe. That's not quite it yet, but let's just try that going back to the procedures, and have the ice skater move forward distanceToMove If we run that, she's still going to the middle of the ice floe, but I'm going to keep working on the math, I'm going to have another variable, also a double called halfWidthIce. Again, giving that any value, because we're going to replace it. So the halfWidthIce I need to now go to the icefloe. I go to the functions and select getWidth, and drag that to replace that. (I'm going to make this screen a little smaller on this side, so that we can see more of the code.) Instead of just the width, I want half of the width. so I'm going to select math and it's going to be the icefloe.width / 2 And you can see what I selected now, I know that was off the screen a little bit. So I have the distanceToMove The whole thing would put her in the middle of the ice floe. Then I have half the width of the ice floe, and I want to subtract this from that total distance. To do, I'm going to use an assignment statement and distanceToMove is equal to distanceToMove, another math problem: distance to move minus half the width of the ice. Let's run it. and she stops right at the edge of the ice floe. It's possible that we also have to subtract half the width of the person to have them move exactly where wanted. You should experiment with that Until you are comfortable with creating these math equations.