<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
I have an idea for this:
<div><br>
</div>
<div>1. Create a bullet object. It doesn’t have to be visible for this game, I think, so it can be a dummy object. I used a bird from the Animals because it’s small and it can be seen during development.</div>
<div>2. Move and orient the bullet to the revolver. Set the vehicle property of the bullet to the revolver as well.</div>
<div>3. In the shoot method, move the bullet forward the distance to the desired object. Do this with duration 0 seconds so it happens instantly. If the revolver was pointing at the object, the bullet will be right on top of it. If the gun was pointing a little
off, the object will be a little off. So:</div>
<div>4. Check the distance between the bullet and the object. If it’s within a threshold, the object should break. (I’m not sure how the student will make a breaking animation.)</div>
<div><br>
</div>
<div>I modified the file you sent as a proof of concept, but I can’t attach it to the email. You have to aim a little low for it to work.</div>
<div><br>
</div>
<div>James<br>
<div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>--</div>
<div>Dr. James Vanderhyde</div>
<div>Math and Computer Science</div>
<div>Benedictine College</div>
<div><a href="mailto:jvanderhyde@benedictine.edu">jvanderhyde@benedictine.edu</a></div>
<div><a href="http://vanderhyde.us/~james/pro/">http://vanderhyde.us/~james/pro/</a></div>
</div>
</span></div>
<br class="Apple-interchange-newline">
</span></div>
</div>
<br>
<div>
<div apple-content-edited="true"></div>
<br>
<div>
<div>On Dec 19, 2013, at 12:28 PM, Eric Hillstrom <<a href="mailto:ehillstrom@durango.k12.co.us">ehillstrom@durango.k12.co.us</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div dir="ltr"><br clear="all">
<div><br>
</div>
-- Question and request for help form student.
<div><br>
</div>
<div>I am making a game and cannot figure out how to make an object break when shot and only when the revolver and object are aligned with a minimal +/- factor.</div>
<div><br>
</div>
<div>For example, the space bar fires the revolver. Only when the revolver and lamp (object) are in near alignment should the lamp break when the revolver is fired. The lamp should not break when fired and when not in alignment. I will apply the problem
to other objetcs in the world when solved how to do this.</div>
<div><br>
</div>
<div>See attached file names Shoot em Up.</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Dan<br>
<div>
<div dir="ltr">
<div><br>
<br>
<br>
<br>
Eric Hillstrom</div>
<div>Teacher, CTE/Technology</div>
<div>Durango High School</div>
<div>970-259-1630 x2202<br>
</div>
</div>
</div>
</div>
</div>
<span><Shoot em' Up.a2w></span>_______________________________________________<br>
alice-teachers mailing list<br>
<a href="mailto:alice-teachers@lists.andrew.cmu.edu">alice-teachers@lists.andrew.cmu.edu</a><br>
<a href="https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers">https://lists.andrew.cmu.edu/mailman/listinfo/alice-teachers</a><br>
</blockquote>
</div>
<br>
</div>
</body>
</html>