View Full Version : stuff doesnt collide!!!
thewhiterabbit.
11-06-2006, 07:52 AM
is there some simple way of makinging things 'collide'?
I'm wondering this myself. My son would like his cars not to drive through one another. :)
I'm a developer, so if I need to change code, I might be able to do that if someone had an idea of where to look and what to do.
roofy
11-06-2006, 09:06 PM
Well, the simplest way is to check one object's distance to another. However, the problem with this is that Alice checks the distance between 2 objects by the objects pivot point and it is not always at the center of an object.
Also, what baffles me even more is how some of the students at Carnige University were capable of programming the game below with Alice.
http://www.etc.cmu.edu/projects/bvwWorlds/movies/bedrockin_live.wmv
Yasjalnadie
11-21-2006, 08:43 AM
Well, what you could do is the same I did, just get the object's on the same x-axis, when they meet move then object's part's in a way as tho they did hit, do you see what I'm saying? I did the same thing, I made two people run and hit each other in mid stride, its pretty simple, just takes time. Btw, when I get home from school I'll post what I wrote.
Cheers,
Yasjalnadie
Perhaps this is something for the developers to think about in alice 3.0 yes?
PogoDaMonkey
11-29-2006, 12:37 PM
They programmer that in Alice!? Wow...forget collisions, the meshes and the way the had thing such as the dinosaurs tail move up and down without any clipping erros with the rest of the tail is amazing...let alone that it probably took a while for two people to do all this (programming wise). Carnegie Mellon is in Virginia, right? Might have to see about visiting...
Oh, and one way I have figured out to stop things from clipping is to make a "sphere of influence," creating a sphere that covers the entire object, then making it invisible, making the object in question its vehicle, and using it as a reference point for that object. Much easier for square objects, or verticle ones, rather than shapes like rectangles. Then use the "If (object 1's sphere) is within X distance of (object 2's sphere), do (crash? move back?)
Heres one example I found in the forums earlier, modified a little so it does more than just show "HIT----"