Alice Community  

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

Thread Tools Display Modes
Wall Collision
Posts: n/a
Default Wall Collision - 05-09-2010, 10:34 PM

How do stop models from passing through squares (squares being walls)
I'm using Alice 2.0

I have tried using a if/else
if "model" is within .1 meters of square "x"
"model" move backwards "0.5 meters"
and that doesn't work

I have also tried using functions such as
If "model" distance in front of "square x" <= 0.5 meters
"model" turns right (as seen by "square x")

Niether works for too long
I put both in infinite loops but that doesn't help much either.
The model im trying to keep contained moves in a random pattern.

I've used the search function, tried many different ways. One did manage to prevent the model from ever going through, but the second it touched the wall it would stop moving.

Last edited by MunnyMike; 05-09-2010 at 11:23 PM.
Reply With Quote
Senior Member
Dameria's Avatar
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 05-10-2010, 08:29 AM

I made an example of a maze using multiple wall collisions, it is in the maze game in my signiature, or just click the link here:

Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ...................
Alice Paint ...........................
Real-Time Clock ..................
Maze Game .........................
Reply With Quote

collision, model, stuff, wall

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