Alice Community

Alice Community (
-   Share Worlds (
-   -   collision detection (

Zack Strife 01-23-2010 01:28 PM

collision detection
1 Attachment(s)
My method for a relatively simple collision detection.

Veryuhbull 01-23-2010 10:47 PM

Good job!
i can't believe no one has done this before.:eek: I tested it and it seems promising.:D I checked your code and would like to see it tested with more objects in the world. (EDIT:currently testing myself and it isn't working the same. i'll keep working on it.) I'll be using this ethod from now on if is continues to work so well. Smooth and unbuggy just how i like it. Major props. :)

Zack Strife 01-23-2010 10:58 PM

some things you have to do is if your doing the check "is in front of" or something, are, 1. put as seen by world or camera or whatever your using, and 2. it won't work with the camera directly so you have to add another object and orien and vehicle it to the camera and run the check with that

x2495iiii 01-23-2010 10:59 PM

I agree, this is very nice work. Do you think you could apply your logic to a house or a person?

Veryuhbull 01-23-2010 11:00 PM

Yeah i know. I tried this before and never had this good of results. i was building on your world and added another cylinder and dublicated the code and replace the item name from cylinder to cylinder2. it got glitchy. like what X said, if this can transfer to other stuff that would be REALLY good. I would think the code would need to be customized for every object due to proportions.

x2495iiii 01-23-2010 11:13 PM

Probably, which is why no one has been able to make a concise, yet functional collision detection engine yet.

Veryuhbull 01-23-2010 11:17 PM

1 Attachment(s)
More testing reveals that the original works well because of a balenced equation and envelope of precision. Hard to replicate :(. I added a second object and got the coding to get close to original condition. But going straight throuhg the middle of an object still happens.

Zack Strife 01-24-2010 08:32 AM

That's weird, the only glitch I've found was if you hit it just right than it will just stop, not go to the right or the left

x2495iiii 01-24-2010 08:38 AM

So your system is based off of the proportions of the object? Is there any way we could replace the object with an object variable and the proportions with size functions?

Tro 01-24-2010 12:49 PM

I wana try this out. Tagging this

jediaction 01-25-2010 10:35 AM

Can i use this for my games?

Hey everybody, check out my album

x2495iiii 01-25-2010 10:53 AM

I bet he'd like that, but remember, you'd need a different equation for each object.

dannyxowns 01-27-2010 03:52 PM

I tried downloading the world, but it would only download as an MPEG MP3 file. how do i fix this or download it so i can open it with alice?

Veryuhbull 01-27-2010 05:24 PM

2 Attachment(s)
Well i'll throw in my latest Collision Decection attempt i made recently. More concept demonstration than working model.

You press space to move to the top of the cube when you are close enough. This is a very rough step up lacking animations and needs debugging/editting. My main problem is that i can't figure out a way for my passive commands to be stopped in mid-run to execute an active command. Red cube can be climbed and drop off of. Blue can climb and has nothing to pull you back down. EDIT: I added some animations.

And presummably i could distribute the grid as a method instead of placing the markers all manually.

Zack Strife 01-27-2010 08:49 PM

1 Attachment(s)
Ok, A, yes jed, you can use this. and 2, I found the problem I think, you had the program run the two checks separately at the same time, what I did was put one in the other so that way It won't cause any errors try it out

Veryuhbull 01-27-2010 09:11 PM

1 Attachment(s)
Oh i see what I did wrong. Zack i went back and cleared out the code and fixed the reverse method also. Now there are 5 cylinders (wanted to see if the code can handle it) and it worked fine. I put the world speed multiplyer back to regular because it doesn't need to be lowered. Although if the camera goes too fast there is potential for a slip through the detection.

Anyone have any input on my other world?

jediaction 01-28-2010 08:59 AM

Well anyway, this collision is great

Zack Strife 02-06-2010 08:24 PM

1 Attachment(s)
Here I edited my collision detection, I added an endless wall and am working on a partial wall

jediaction 02-11-2010 03:35 PM

Well, yah, i cant use this because i would have to make a code for each object and side so...i still can but not with like big big games

Zack Strife 02-11-2010 03:42 PM

The endless wall would just be for if you didn't want your character to stay out of an area or something. And the partial wall I am still working on

King Gamer(gorit) 02-15-2010 01:29 AM

Would this work with lists
1 Attachment(s)
I have always been trying to implement a c.d. program with lists. I got one that worked while going forward but it is really cluttered and doesnt need to be in a list.
Made a version that is good for trees or other duplicate objects. If you look through the code you should see how you just either add the number of the the object in the list or in a variable list of numbers, It is good also to keep track of the amount of objects used. I have not tested this going any direction other than straight forward.

jediaction 02-15-2010 09:58 AM

[QUOTE=Zack Strife;16785]The endless wall would just be for if you didn't want your character to stay out of an area or something. And the partial wall I am still working on[/QUOTE]

Youve been working on that wall for a long time but im still kinda troubled with your thing. I am still trying to figure out how to duplicate it "while" understanding what its doing

Zack Strife 02-25-2011 09:25 PM

1 Attachment(s)
I started working on my collision again, you still have to make a code for each object, and I made some collision for a house though it is still glitchy, just dont go at it from the corners

All times are GMT -5. The time now is 01:32 PM.

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