Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
How to face a moving object?
Old
rcottiss
Guest
 
Status:
Posts: n/a
Default How to face a moving object? - 06-18-2008, 10:32 PM

Hello,

The 1st thing I tried with Alice was to extend the Skater Tutorial. I added a Cow and I want the Cow to always Face the Skater while the skater is moving. The Cow has a Method 'Constrain to Face' which looks ideal but I cannot figure out how to keep the Cow facing the Skater at all times. I thought Do Together woujld help but the Constrain to Face seems to always be bound to a duration rather than solely the position of another object. Any pointers?

Thanks, Robin
   
Reply With Quote
Old
rich0e0rick
Senior Member
 
rich0e0rick's Avatar
 
Status: Offline
Posts: 141
Join Date: Jan 2008
Location: Sturgeon Falls
Default 06-18-2008, 11:03 PM

first, in the world section, make a new method and call it cowlooking

in cowlokking method, put a loopinfinity(bottom of scree) and put in it the COW point at SKATER. then click on the more option and but the style to abrutly.

next, go to the top right corner and make a new WHEN WORLD STARTS
and but in the method cowlooking

tada

hope you figure it out

Rick


im back!!! FINNALY!!! got windows working on my mac again!!!
   
Reply With Quote
Old
rich0e0rick
Senior Member
 
rich0e0rick's Avatar
 
Status: Offline
Posts: 141
Join Date: Jan 2008
Location: Sturgeon Falls
Default 06-18-2008, 11:03 PM

oh, and change the duration to 0.01 so it goes faster...

Rick


im back!!! FINNALY!!! got windows working on my mac again!!!
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 06-18-2008, 11:11 PM

Quote:
Originally Posted by rcottiss View Post
Hello,

The 1st thing I tried with Alice was to extend the Skater Tutorial. I added a Cow and I want the Cow to always Face the Skater while the skater is moving. The Cow has a Method 'Constrain to Face' which looks ideal but I cannot figure out how to keep the Cow facing the Skater at all times. I thought Do Together woujld help but the Constrain to Face seems to always be bound to a duration rather than solely the position of another object. Any pointers?

Thanks, Robin

Although this is not direct answer to your question, about 18 months ago, I attempted to document the behavior of all the primitive methods in Alice including the one that you are talking about. You will find that information online at http://www.dickbaldwin.com/alice/Alice0900.htm

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Re: How to face a moving object?
Old
rcottiss
Guest
 
Status:
Posts: n/a
Smile Re: How to face a moving object? - 06-21-2008, 11:42 AM

Quote:
Originally Posted by rich0e0rick View Post
first, in the world section, make a new method and call it cowlooking

in cowlokking method, put a loopinfinity(bottom of scree) and put in it the COW point at SKATER. then click on the more option and but the style to abrutly.

next, go to the top right corner and make a new WHEN WORLD STARTS
and but in the method cowlooking

tada

hope you figure it out

Rick
This worked great. Thanks!
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.