Alice Community  

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

Reply
 
Thread Tools Display Modes
Proximity
Old
razielpro
Junior Member
 
Status: Offline
Posts: 7
Join Date: Mar 2012
Default Proximity - 03-27-2012, 12:53 AM

Hi,

I am trying to get the Alice Liddell object to turn 1/4 revolution when the camera is withing 1 meter of her. I've tried:
If Alice Lidell is within 1 meter of Camera
AliceLiddell turn Right.25 Revolutions
I use the mouse to control the camera

When I advance toward Alice I go right through her and nothing happens.

Using
AliceLiddell is at least 1 meter away from Camera
It seems like the instruction skips entirely and Alice will make the turn regardless of how far she is from the camera.

The goal is to have the user walk through the Amusement park using the mouse. When the user comes upon a ride or hotdog cart the a method will run and objects will interact.

Can this even be done?

Thank you in advance.
   
Reply With Quote
Problem with your program
Old
aikmin
Senior Member
 
aikmin's Avatar
 
Status: Offline
Posts: 85
Join Date: Mar 2008
Default Problem with your program - 03-27-2012, 06:42 AM

Use the method [object] move to [subject] to move the camera to aliceLiddell and you will notice that the model is actually very large and the 0,0 point is at her feet. Even moving the camera into aliceLiddell will not move the camera to within 1 meter of aliceLiddell since the distance from feet to camera is > 1 meter. Use the print [aliceLiddell] distance to [camera] to check the distance.
   
Reply With Quote
Proximity
Old
razielpro
Junior Member
 
Status: Offline
Posts: 7
Join Date: Mar 2012
Default Proximity - 03-27-2012, 06:31 PM

Thanks for getting back to me aikmin. I guess what I'm wondering is, how does alice know that the camera is near her? I could click on each individual ride to run the method but that's cheesey in my opinion. I think it woudl be more realistic if an object knew that the user was near it when they use the mouse to operate the camera.

I posted from my phone last night. This is my best guess at how to do this. Any help you can offer is greatly apppreciated
Attached Files
File Type: a2w alice proximity.a2w (287.8 KB, 3 views)
   
Reply With Quote
This is what I was looking for
Old
razielpro
Junior Member
 
Status: Offline
Posts: 7
Join Date: Mar 2012
Default This is what I was looking for - 03-29-2012, 06:40 PM

Nick Faldo's collision detection tutorial



http://www.youtube.com/watch?v=2gstaiVGqkk
   
Reply With Quote
Old
dakota95
Senior Member
 
dakota95's Avatar
 
Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
Default 03-30-2012, 09:05 AM

Im going to guess that your problem is not puting your method in the right place. The method that you described in your first post up top, is the correct method. What you should do is to create a "when the world starts" then right click on it and change it to "while the world is running". Then Insert your method into this.


<Insert_Signature_Here>
   
Reply With Quote
Old
dakota95
Senior Member
 
dakota95's Avatar
 
Status: Offline
Posts: 426
Join Date: Aug 2011
Location: like I would tell you. ;)
Default 03-30-2012, 09:46 AM

Here is an example world that I made. Go to the ferris wheel cause that is the only ride that works. If you just want to see the ride go around in cicles back off and press space.

Arrow keys to move
Click on yes or no to answer questions
Attached Files
File Type: a2w Park 1.0.a2w (1.88 MB, 5 views)


<Insert_Signature_Here>
   
Reply With Quote
RE: Proximity
Old
razielpro
Junior Member
 
Status: Offline
Posts: 7
Join Date: Mar 2012
Default RE: Proximity - 04-04-2012, 06:30 PM

Quote:
Originally Posted by dakota95 View Post
Here is an example world that I made. Go to the ferris wheel cause that is the only ride that works. If you just want to see the ride go around in cicles back off and press space.

Arrow keys to move
Click on yes or no to answer questions
This was very helpful Dakota.

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 ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.