-
Anybody has suggestions, tricks, to deal with "simple" (2 dimensional) collision detection in a 3d surrounding (z-axis)?
raoul
-
The Code For that Is Emmense To much For Me To Write Here!!
-
Senior Member
Make each of your 3d chars a Mc do collision that way in 2d. But man wish you luck codding the z-ax collisions.
Mess-psi
-
That is exactly what I mean! There must be a way to simplify this?
-
Senior Member
I have created a shooting game that does something like 3d detection and it runs well.
Create a fast 2d collision detection engine. Look at examples in movies or elsewhere. Then loop this collision engine for each z-depth you need to check. Example: z-depth of 1 unit: find what mcs are in depth 1 and check if collided. Z-depth of 2units: find what mcs are in here and check if collided. etc.
set variable "d"=depth
loop(d)
place your 2d collision detection here and check the "d" layer
set variable "d"=d-1
end loop
bOf course the more depths you have to check the longer the process will take.
E-mail me if it is not clear.
-
Thanks, The problem is when to set d=d-1 as the z-depth is not a regular process and will vary for each situation.
I was thinking about using the scale of objects as an indicator for the z-depth, have to try it yet!
-
Yes USing The x and y scale of an object would be sufficient for 3d collision detection!!
This Would Have To Be Donw In A Loop While!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|