Results 1 to 3 of 3

Thread: Collision detection through f(x,y,z)

  1. #1

    Thread Starter
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    Collision detection through f(x,y,z)

    I've been wondering whether or not it would be possible for a 3 dimensional game to use a 3 dimensional function as collision detection, meaning that instead of checking vertices, you would simply check them to a single equation. This equation would, of course, be determined by the vertices of the model and calculated during design time, making calculation time irrelevant. If possible, how could the function be derived (approximately, the model would have a "width" anyway)?

    PS: Sorry if I'm a bit incoherent, its after midnight here.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    What shaped objects, are they moving, are they accelerating, is the detection to be during an time interval or instantaneously?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860

    ....

    I'm guessing using a system like this...

    (this is in Basic)
    VB Code:
    1. type thing
    2. x as integer
    3. y as integer
    4. z as integer
    5. end type
    6. dim stuff (0 to 9) as thing
    7. dim mover as thing
    8. dim area(0 to 99, 0 to 99, 0 to 99)
    9. for a = 0 to 9
    10. stuff(a).x = int(rnd*100)
    11. stuff(a).y=int(rnd*100)
    12. stuff(a).z=int(rnd*100)
    13. next a
    14. for a = 0 to 9
    15. area(stuff(a).x,stuff(a).y,stuff(a).z) = 1
    16. next a
    17. do until 'you are happy with it
    18. 'Code that changes variable MOVER around here
    19. if area(mover.x,mover.y,mover.z) = 1 then print "AHHH ASTEROID"
    20. loop

    Basicly you wouldn't want to use this on moving objects cause it would take more time the it saves... uses up alot of memory too..
    Don't pay attention to this signature, it's contradictory.

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