Results 1 to 10 of 10

Thread: Collision done directly with OnCollision ( don't understand it, help me understand)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    change the DoMove to
    Code:
         Left :=   Round(X); // what is this +2 , same with +1 so it seems,no + not work
         Top :=    Round(Y); // what is this ?
    cause you set +4 already in OnCollision, this means if you set X+2 here it means you test Left(wich is X) later with Left+2+4 instead of Left+4

    EDIT: meh stupid me, it should also work if you remove the +5, -8 it is only good if you have a sprite wich has transperant borders to match power of two, means a 24x56 sprite in a 32x64 texture
    so you would have to set all +/- to +4 and -4 to make the sprite collision correctly without space between tile and character
    Last edited by Daikrys; 28-08-2011 at 04:55 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •