A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Collision detection in 3D surrounding?

  1. #1
    Senior Member
    Join Date
    Feb 2000
    Posts
    226
    Anybody has suggestions, tricks, to deal with "simple" (2 dimensional) collision detection in a 3d surrounding (z-axis)?

    raoul

  2. #2
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    The Code For that Is Emmense To much For Me To Write Here!!

  3. #3
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756
    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

  4. #4
    Senior Member
    Join Date
    Feb 2000
    Posts
    226
    That is exactly what I mean! There must be a way to simplify this?

  5. #5
    Senior Member bigczech's Avatar
    Join Date
    Apr 2000
    Posts
    240
    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.


  6. #6
    Senior Member
    Join Date
    Feb 2000
    Posts
    226
    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!

  7. #7
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center