Collision Help...

Blitz3D Forums/Blitz3D Beginners Area/Collision Help...

but using rotateentity was not working properly, and setting a pivot, and using pointentity is so simple to make sure the player is rotated properly, then just do a moveentity 0,0,1 to move forward or -1 to move backwards as long as the player is rotated correctly.

No you shall not write the game for me, since I already have a beta of it done, like I said, I have it working, I just want a better way to do it..

Here is some pseudo code I came up with today, gonna finish it off, and convert it to real code tonight.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; NEW PLAYER SHOOT FUNCTION
;; INCLUDES MULTI-HIT COMBO CHECKING
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
function PlayerShoot(p.player)
if p\direction = 4 then
  setup pivot
  rotate player
  mycounter = 1
  repeat
   Move Player
   mycounter = mycounter + 1
  until count collisions > 0 or mycounter > 3.

  if meshesintersect(p\bubble,fruitlevel(x,z)\item)=true then
    check multi
    if multi then
      ;remove items listed in multi array
      add points from multi array
      set all items from multi array in fruitlevel to hidden=1
      clear multi array
    else
      ;remove single item collided with
      add points from that item
      set that item in fruitlevel as hidden=1
    endif
    for x = 1 to 8
      for z = 1 to 8
        if fruitlevel(x,z)\hidden = 1 then
          hideentity fruitlevel(x,z)\item
        endif
      next
    next
  endif

return player to original location.
return ;return back to main game loop.
endif

;do same for other 3 directions.
end function