Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Collision - example(?)  (Read 13066 times)

0 Members and 1 Guest are viewing this topic.

Fuv

  • Newbie
  • *
  • Posts: 35
    • View Profile
Collision - example(?)
« Reply #30 on: June 11, 2010, 06:56:07 pm »
Heh, yeah indeed.

I just want that one object can not go into the 2nd one. I want to make that one cannot cover 2nd in one place. No explosions there :)

Kind Regards
Fuv

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Collision - example(?)
« Reply #31 on: June 11, 2010, 07:08:06 pm »
so ? what's your problem ?

Try to describe on paper what you want (geometry, pseudocode, ...) and then try to implement it.
If you have a problem on a precise point ask for help. But we won't do all the stuff for you. That's no help for you in the long run.
SFML / OS X developer

Fuv

  • Newbie
  • *
  • Posts: 35
    • View Profile
Collision - example(?)
« Reply #32 on: June 11, 2010, 09:21:37 pm »
But I dont have even any idea. I tried like that, but not working.

Code: [Select]
    if(!Collision::BoundingBoxTest(Ludzik, Przesz))
{
if(App.GetInput().IsKeyDown(Key::Up))
Ludzik.Move(0, -100 * time);
   if(App.GetInput().IsKeyDown(Key::Down))
    Ludzik.Move(0, 100 * time);
   if(App.GetInput().IsKeyDown(Key::Left))
    Ludzik.Move(-100 * time, 0);
if(App.GetInput().IsKeyDown(Key::Right))
    Ludzik.Move(100 * time, 0);
}


I dont know how it should be solved.