Alice Community  

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

Reply
 
Thread Tools Display Modes
Collision Detection
Old
TheDarkTwins
Guest
 
Status:
Posts: n/a
Question Collision Detection - 04-29-2009, 01:49 PM

I know that Alice 2.0 doesn't have Collision Detection, however, I know there are ways to program around this. I am trying to use a character and a the first pre-made maze. However because of no CD my character goes right through the walls. This makes the maze very hard to work. I need some step by step instructions on how to just get 1 of the 34 walls the maze has. I have tried a few things, but every time I think I have something that will work my character still walks right through the Maze walls.

I want to make it so that even if my character has to walk farther that she stops and turns around and walks a few meters away from the wall. Any help would be greatly appreciative. I am in a bit of a time crunch (assignment due be next week) so any help would be great.

Thanks,
Drew
   
Reply With Quote
Old
pingu
Guest
 
Status:
Posts: n/a
Default 04-29-2009, 02:37 PM

what you could do is have a if/else proximity method, so that if the object/person is within let's say, 0.5 meters of the wall, it will perform a method like walk 1 meter backwards, else do nothing. hopefully this'll help...

pingu
   
Reply With Quote
Old
HisWorld
Guest
 
Status:
Posts: n/a
Default 04-29-2009, 06:21 PM

major problem with that. from what I can tell if you try to do a proximity collision detection, it will be set from dead center.......meaning if you have something not perfectly round then certain area's of your object will either be closer of farther from the center.

One way I tried to do this still ineffectively is to say

example:
the object i am moveing is "alice" and the subject i want collision detection on "wall"

if "alice" is within subject="wall"'s width / 2 of "wall"
do nothing
else alice move forward 3 meter in one sec

tell me if this helps.
   
Reply With Quote
Old
TheDarkTwins
Guest
 
Status:
Posts: n/a
Default 04-29-2009, 09:11 PM

This is way too much work for a final project. I tried it for about 4 hours (before I saw your answer) and decided to switch gears only to see that I would have another problem (which I made a thread for). I do appreciate your help and I may try it later, but for right now, I think that it is just too much work for a program that is only suppose to run for 2-3 minutes.

Drew
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Question 04-30-2009, 04:20 PM

How do you program a charcter so that when they crash into the ground, something happens? Just like in the example world with the biplane.
   
Reply With Quote
Old
HisWorld
Guest
 
Status:
Posts: n/a
Default 04-30-2009, 05:46 PM

Quote:
Originally Posted by dubastot View Post
How do you program a charcter so that when they crash into the ground, something happens? Just like in the example world with the biplane.
You could look at the code for the biplane and try to imate the part that handles the collision, or look above for my explainer.
   
Reply With Quote
Old
dubastot
Senior Member
 
dubastot's Avatar
 
Status: Offline
Posts: 661
Join Date: Apr 2009
Location: Two Steps From Hell
Exclamation 05-22-2009, 11:17 AM

Quote:
Originally Posted by HisWorld View Post
You could look at the code for the biplane and try to imate the part that handles the collision, or look above for my explainer.
I have tried that, but it still doesn't work. here is my animation. The collision detection is in the toyplane, crasher method.
Attached Files
File Type: a2w Plane sim.a2w (405.9 KB, 28 views)
   
Reply With Quote
Old
vazin
Guest
 
Status:
Posts: n/a
Default 05-22-2009, 03:04 PM

Quote:
Originally Posted by TheDarkTwins View Post
I know that Alice 2.0 doesn't have Collision Detection, however, I know there are ways to program around this. I am trying to use a character and a the first pre-made maze. However because of no CD my character goes right through the walls. This makes the maze very hard to work. I need some step by step instructions on how to just get 1 of the 34 walls the maze has. I have tried a few things, but every time I think I have something that will work my character still walks right through the Maze walls.

I want to make it so that even if my character has to walk farther that she stops and turns around and walks a few meters away from the wall. Any help would be greatly appreciative. I am in a bit of a time crunch (assignment due be next week) so any help would be great.

Thanks,
Drew
Ther are some good examples by madden and Dr Jim posted on
www.tech4dreams.com

Hope is useful information

Cheers
   
Reply With Quote
Old
Phanatic
Guest
 
Status:
Posts: n/a
Default 05-23-2009, 04:47 PM

maybe try making a function if plane is behind or below the ground(-a little) return true (else false) then call that in the events handler to do a crash method when it becomes true
   
Reply With Quote
Old
dmitchell
Guest
 
Status:
Posts: n/a
Thumbs up 06-05-2009, 07:29 AM

Quote:
Originally Posted by vazin View Post
Ther are some good examples by madden and Dr Jim posted on
www.tech4dreams.com

Hope is useful information

Cheers
that is true the site is the best help so far
i could use help to.please follow the link below.it will be a great help and it might help you to.
http://www.alice.org/community/showthread.php?t=2727

Last edited by dmitchell; 06-05-2009 at 08:43 AM. Reason: adding help request
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.