Author Topic: Speed difference between two different ways of collision checking  (Read 7396 times)

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Speed difference between two different ways of collision checking
« Reply #15 on: October 17, 2008, 01:29:34 pm »
Awesome.  This guy thinks of everything   ;D

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: Speed difference between two different ways of collision checking
« Reply #16 on: October 17, 2008, 04:35:51 pm »
Unfortunately, it all goes over my head at the moment.  ??? I was looking though, and you don't have to use a ray from the camera, if I remember right.  One simple way might be to cast a ray straight down from above the terrain and move it around with the mouse.  That way I would know the x,z from the ray position and I could just place some kind of marker for the cell size when it crossed to the next cell using the y position from the average of the vertices and the x,z from the ray start.
click here->Fireside 7 Games<-

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Speed difference between two different ways of collision checking
« Reply #17 on: October 17, 2008, 10:49:37 pm »
Unfortunately, it all goes over my head at the moment.  ??? I was looking though, and you don't have to use a ray from the camera, if I remember right.  One simple way might be to cast a ray straight down from above the terrain and move it around with the mouse.  That way I would know the x,z from the ray position and I could just place some kind of marker for the cell size when it crossed to the next cell using the y position from the average of the vertices and the x,z from the ray start.
That could work if you get it intuitive enough to use easily.  Tell you what, I'll start working on figuring out the camera ray method and calcMinDistance to get exact xyz coordinates.  I'll post a small demo program, source code, and detailed explanation when (if) I get it working.  If not, then I'll probably use your idea instead.