As many people before me, I'd like to thank you for this series. Your explanations are detailed, but easy enough for even a beginner to understand. I also appreciate that you tried to show us very clean, reusable code. (As opposed to less professional "as long as it compiles, it's good enough" tutorials.) Your series may (so far) only teach the basics, but they are good, solid basics on which we can build further learning. Your personality is a big + too. The viewer can feel that you're a good person who enjoys sharing his knowledge. That's important too when you teach beginners, since a beginner may need to feel some comforting human warmth in this unknown SFML territory. You got a well deserved donation from me. Thank you, sir. :)
@yogxoth19594 жыл бұрын
This is the ONLY resource on the entire internet that worked for me, I've been tearing my hair out over this for days. THANK YOU SO MUCH!
@turbo300678 жыл бұрын
your tutorials are the best out there. really good job. you make it so easy to follow. thanks for existing
@evanmcblevan2 жыл бұрын
the same: IM SUBBING
@t-jolt72355 жыл бұрын
I have a problem with my collision where it doesnt accept player before .GetCollider(). This happens at the very end between player.Update and view.setCenter. If you know what my problem could be please tell me.
@mudzi94337 жыл бұрын
Thank you so much for this tutorial! :3 Not only did I finally make my collision work, but I also understood what I was doing C:
@Tomab32 жыл бұрын
Thank you for all the work that you put into these videos, I learned a lot and really became fond of sfml it feels more natural than SDL2.
@RameenRameen-g6oАй бұрын
Thank you soooo muchh for this series man ...I wish I could get more
@lorow25428 жыл бұрын
It seems so damn easy with your tutorial!
@PflanzenChirurg8 жыл бұрын
i might repeat but i want more of ur stuff :D
@dafemele108 жыл бұрын
I get an error "Expression must be LValue" on this part: platform1.getCollider().chechCollision(player.getCollider(), 0.0f); ^
@Pedro62ful6 жыл бұрын
I got the same error, did you fix yours?
@invis74766 жыл бұрын
Same here, not sure what I'm doing wrong.
@blueseelen80476 жыл бұрын
So I quess we will never get an answer what's wrong :(
@TheCarljeff6 жыл бұрын
Hey, I was just having this same problem and I fixed it by removing the & in the CheckCollision parameters. So instead of CheckCollision(Collider &other, float push), it is CheckCollision(Collider other, float push). (make sure to modifyt the header as well)
@niallmaple6 жыл бұрын
It needs you to store the players collider before passing it by reference, so Collider col = player.GetCollider(); , then pass col in. Since the getcollider returns a Collider, not a Collider* or & so as soon as that finishes it goes out of scope, meaning the pass by reference will be referencing bad memory. It's usually more efficient to pass by const reference for somewhat complicated data structures (aka anything thats not a standard int or float etc) but if within the function that is taking it, wants to modify that type - it cannot be const.
@bendgk1236 жыл бұрын
Instead of push you could say inertia. Inertia is defined as how resistant an object is to any force. An object having a higher inertia would “push back” harder
@keithan73872 жыл бұрын
in 14:33 i made that getCollision in my player.cpp file but it says that body is an undeclared identifier? I have even include the collision file in the h file of my player.
@tomgola33 жыл бұрын
Hey its me from earlier videos! Don't worry i didnt give up and am still plugging away! I actually feel proud i managed to make a little "game" where a character moves and shoots and learned quite a bit! now im trying to understand collision this is really tough and my next challenge. I am probably going to watch this video alot!
@_simobr4 жыл бұрын
When I write player.getCollider() in the CheckCollision method it tells me this: initial value of reference to non-const must be an lvalue 49 cannot convert argument 1 from 'Collider' to 'Collider &' Can anyone tell me why?
@aayushkarki1084 жыл бұрын
did you fix it? I got the same thing
@_simobr4 жыл бұрын
@@aayushkarki108 nope, I've done the collider method in the class to resolve, but it isn't very correct
@aayushkarki1084 жыл бұрын
@@_simobr is it possible for you to share the resolved code?
@_simobr4 жыл бұрын
@@aayushkarki108 meme its not properly solved
@eduardomora60283 жыл бұрын
I got this error too, I don't know how he didn't get this. The problem is that in the getCollider function you are returning a temporary Collider object and you have a reference to Collider in CheckCollision function, you are trying to bind a non-const reference to a temporary object which is not allowed. What I did was create an empty default constructor for Collider class, create private default Collider objects in the platform class and player classes, then in the getCollider function I set these objects to Collider(body) and return that value. Lastly, I have the type of getCollider be Collider& (reference to collider object) instead of Collider. Now when you use pass in player.getCollider() in the CheckCollision method you are actually passing a reference to a non-temporary Collider object. There might be a shorter way to bypass this issue but this is what worked for me.
@quinn76303 ай бұрын
As of 2.5.1 the coordinates systems is a bit different so if the colliders go crazy after touching, try inverting the ">" on the if statements in the checkCollision method I think its because the Y axis becomes positive when tou go down and negative if you go up in the lasts updates. Idk why i also had to invert the X axis tho, i think that one is still normal
@witzur56957 жыл бұрын
This is the best tutorial series on YT great job.
@rexy_mirror12256 жыл бұрын
Hello good sir! So far your tutorial videos have been fantastic. However, I encountered an error on the main.cpp. The player in platform1.GetCollider().CheckCollision(player.GetCollider(), 0.0f); platform2.GetCollider().CheckCollision(player.GetCollider(), 1.0f); gives an error: initial value of reference to non-const must be Ivalue. Do you know how I can fix it?
@teamfortress2ful6 жыл бұрын
me too, i don't now how fix ;(
@teamfortress2ful6 жыл бұрын
see the comentary of Brian, fixed here
@craig15murdoch5 жыл бұрын
@@teamfortress2ful Who is Brian?
@camerontelford76673 жыл бұрын
YOU HAVE TO TAKE & OUT OF collision & other, float push IN COLLISION.CPP AND COLLISON.H
@soliderarmatang56643 жыл бұрын
@@camerontelford7667 Thank you so much!!!!
@frederikja22107 жыл бұрын
your thing called push in physics is named mass :D
@douglasyamasaki10955 жыл бұрын
i`m trying to work your code out on my project , but somehow i cant collide in both ways , only on one way. if i do platform1.checkcollision with player it works well , but if i do player.checkcollision with platform1 it doesnt work . any clue on that? tried revising everything and it looks ok.
@tushankhan18534 жыл бұрын
How to fix redefinition in collider??
@Esteban39997 жыл бұрын
error: no matching function for call to 'Collider::CheckCollision(Collider, float)'| on platform1.GetCollider().CheckCollision(player.GetCollider(), 0.0f); same for platform2 What might be the reason? Anyone?
@orocimarosay14477 жыл бұрын
same
@lukalazic79996 жыл бұрын
Hey did you fix this problem?
@mr.lowpoly38826 жыл бұрын
Hey.. For all who have the same problem, Here is the simply solution: ..... case sf::Event::Resize: ResizeView(window, view); break; } } Collider playerCollRect = player.GetCollider(); // (or) auto playerCollRect = player.GetCollider(); player.Update(deltaTime); platform1.GetCollider().checkCollision(playerCollRect, 0.5f); platform2.GetCollider().checkCollision(playerCollRect, 0.5f) ----------------------------------------------------- I hope i could help.. Nice Tutorials Hilze Vonck
@chez-wren6 жыл бұрын
@Mr.Lowpoly Hey thanks a lot man! Really needed this for my project. I also have a correction though: you spelt "CollRect" wrong on the platform1 and platform2 lines
@mr.lowpoly38826 жыл бұрын
@Chez Boyz Oh yes sorry .. I changed it, thanks
@EricZeBaws8 жыл бұрын
YAY THANK YOU FOR MAKING THIS!!
@ron0gamingplayz1026 жыл бұрын
Great tutorial as always Vonck! I may be asking too late now, but can you start an openGL series?
@Jayggz8 жыл бұрын
Great video! can't wait to see a gravity tutorial
@asm-ex1jw8 жыл бұрын
And here I am at the end of the journey, eagerly waiting for your next video. As many others here, I have a question for you: I code on a laptop, and I've noticed that CPU usage goes up by a lot (from ~10% to ~70%) when I launch the application, so my machine starts heating up real quick. Apparently, this is due to the opening of the app window, and it's just in part VS's fault: if I open the .exe in the release folder it's still at least 40% extra work on the CPU. I wonder if that's normal and if there's a way to improve the performance on the system. Thanks
@FilipTutorials5 жыл бұрын
Realy nice examples that are easy too folow and bring much programming value with them. Thanks ;)
@vunguyenhoang30755 жыл бұрын
i think "push" variable can be rename to "resistance'
@EricZeBaws8 жыл бұрын
Does it have to be a perfect square or would a rectangle work
@HilzeVonck8 жыл бұрын
+EricZeBaws The collider does not have to be a perfect square.
@EricZeBaws8 жыл бұрын
okay
@shiwanggupta86086 жыл бұрын
I have done exactly what is shown in the video but the platform is not moving. I tried writing platform1.GetCollider().Move(0.1f,0.0f); directly in my main file but still my platform isn't moving. Can anyone think of any mistake that I might be doing? I have already checked the video once again and haven't found any mistake
@eneszeqiri33646 жыл бұрын
samee! ;(
@PleaseWait...3 жыл бұрын
whats the point of (1.0f - push) ????
@parthrupareliya6255 жыл бұрын
can You please send me the code of player.h where you returns the collider of body. because i got an error that cannot bind non-constant value reference of type 'Collider&' to a reverse Type Collider.
@HilzeVonck5 жыл бұрын
This has something to do with the vs2017 and vs2019 compiler. With the vs2015 compiler you were able to directly use a returned copy as a constant reference, but you are not allowed to do this anymore with the vs2017 and vs2019 compilers. To fix this you simply have to store the collider in a local variable first and then pass that collider into the function, or change the function so it takes a collider instead of a constant reference to a collider.
@parthrupareliya6255 жыл бұрын
@@HilzeVonck actually i am compiling this project using latest version of gcc compiler.
@dreamhollow Жыл бұрын
@@HilzeVonck I haven't quite figured out how to store the Collider inside of a variable, could you explain what you mean please?
@ron0gamingplayz1026 жыл бұрын
8:29 Hilze is now an evil eyed sorcerer
@raidoukuzunoha98744 жыл бұрын
can this 1 collision system be appliied to multiple sprites or game objects like enemies, pickups and walls as i thought this is some sort of collision parents for all objects. If so, how can i include it inside each one of them, means like do i have to declare different names of the collider for every different objects. Please let me know cuz im kinda new to sfml and also c++. T-T
@maciejstefanski16525 жыл бұрын
Hey i have an error C2664 "bool Collider :: CheckCollision (Collider &, float)": it is not possible to convert argument 1 from "Collider" to "Collider &"
@maciejstefanski16525 жыл бұрын
Please really help me i wanna make the game but i cant
@HilzeVonck5 жыл бұрын
Hey, the problem is that it is trying to get a reference to an object that isn't defined anywhere. The solution is to simply store the result of the getcollider function and use that variable as an input for the checkcollision function. This is an lvalue vs rvalue issue. vs2015 didn't see this as an issue, but since vs2017 the compiler started to treat this as an error. I hope this helps
@maciejstefanski16525 жыл бұрын
@@HilzeVonck i love u Man. Thanks for fast response. You made mine Day better 😀
@maciejstefanski16525 жыл бұрын
@@HilzeVonck anyway i am new and i work at sfml like 1 hours can u tell me how can i use code to do it and where should i put it please. Still thanks a lot dude
@maciejstefanski16525 жыл бұрын
@@HilzeVonck i am 14years So i am bad xD
@thebeanz78388 жыл бұрын
Hi! I am trying to apply this code into my project, changing it up a bit so it runs with sprites instead of a rectangleshapes, however, when it goes into the "GetPosition" function, it is tossing an Exception thrown at error, Access violation reading location.......not entirely sure what I am doing wrong and why returning a position is giving me this
@КристианИлиев-х5щ8 жыл бұрын
Hey, I have a question. I need to know how can I make my character to pass through the, lets say right side of the window and appear on the left? Its really important for me.Ty
@leonisadonis2 жыл бұрын
ATTENTION EVERYONE WHO USED A LIST AND A FUNCTION INSTEAD OF CLASSES if you had a list that you go throw with a for loop in a function to check for each individual tile then when you collide do break; or its gonna continue to loop after collision has been detected and set collision to false thus fucking it up but I recommend if you are gonna use a functions make it a bool copy the code then in the update set isColliding = collisionFunc(tiles) (or however you called them) and everything is gonna be fine
@stfoggy1242 жыл бұрын
at higher speeds you can easily glitch through the collision, does anyone know how to fix this?
@edgar56865 жыл бұрын
A better name for the variable "push" would be "movability", for example since a wall is not movable then you have a movability of 0.
@mort03035 жыл бұрын
Why isn't it a bool if it's always going to be either 1 or 0?
@edgar56865 жыл бұрын
@@mort0303 it is not always going to be 1 or 0.. The case can happen that it is for example a heavy box and you want the push to be around 0.8 or so..
@mort03035 жыл бұрын
Edgar ah, ok. thank you
@Lyoshiiro8 жыл бұрын
is it possible to use this format/lib file to make 3D AABB instead of 2D AABB? * still for opengl
@johnmaquis62726 жыл бұрын
I get an error "error: no matching function for call to 'Platform::Platform(std::nullptr_t, sf::Vector2f, sf::Vector2f)'" when creating the platforms. Help anyone please?
@ron0gamingplayz1026 жыл бұрын
Hello, my Player keeps moving left or right through the screen at an absurdly high speed. Any solution?
@Welniukstele5 жыл бұрын
Please tell me you sorted it out, and can share how, because I'm having the same problem, but it's either moving downwards or upwards. :D
@ghostly_zsh96095 жыл бұрын
I believe that issue is because you aren't multiplying by deltaTime.
@maxtwist35987 жыл бұрын
it doesnt works if object are moving fast?
@RedubbledD7 жыл бұрын
Hello, i realy like you tutorials. You realy explain things well. but it would be nice if you could put the files online (or code). I am running into some problems when i am colliding with the platforms. When i walk to the platforms, platform 1 is moving away(without colliding), and platform 2 isnt doing anything. except when walking upstairs, then it starts blinking Could someone help?
@EricZeBaws8 жыл бұрын
Sorry I have one more question, How do you check a border in sfml. Ex If an object is touching the border it will do something
@HilzeVonck8 жыл бұрын
+EricZeBaws do you mean the border of the screen?
@EricZeBaws8 жыл бұрын
Yes
@HilzeVonck8 жыл бұрын
Here you go, this function will check if a collider touches the border of a view. bool TouchesViewBorder(Collider collider, sf::View view) { sf::Vector2f colliderHalfSize = collider.GetHalfSize(); sf::Vector2f colliderPosition = collider.GetPosition(); sf::Vector2f viewHalfSize = view.getSize() / 2.0f; sf::Vector2f viewPosition = view.getCenter(); float rdx = colliderPosition.x - viewPosition.x; float rdy = colliderPosition.y - viewPosition.y; float dx = abs(rdx) - (viewHalfSize.x - colliderHalfSize.x); float dy = abs(rdy) - (viewHalfSize.y - colliderHalfSize.y); if ((dx < colliderHalfSize.x * 2.0f && dx > 0.0f) || (dy < colliderHalfSize.y * 2.0f && dy > 0.0f)) { return true; } return false; } As you can see it looks almost exactly the same as the collision code for checking if two colliders are colliding. That is because a view also has a center position and a size. The only thing that really changed is the if statement at the end. This if statement consists out of two parts: (dx < colliderHalfSize.x * 2.0f && dx > 0.0f) and (dy < colliderHalfSize.y * 2.0f && dy > 0.0f). both of these parts basically do the same thing but one of them checks the collision on the x axis and the other one on the y axis. let's take one of these parts and see what it does. The first part (dx < colliderHalfSize.x * 2.0f) basically checks if the collider is within a certain range from the border (inwards), we need to multiply the halfSize by two because we need the full size for this calculation. The second part (dx > 0.0f) basically checks if the rectangle is within a certain range from the border (outwards). So the first part checks the collision for the left and top side of the collider and the second part checks the collision for the right and bottom part of the collider. The reason that they are separated by an or ( || ) is because we want this statement to be true whenever the collider is colliding with one of the sides of the view, and not just the corners.
@EricZeBaws8 жыл бұрын
Thanks so much!!
@estar5007 жыл бұрын
I keep getting the error 'bool Collider::checkCollider(Collider &,float)': cannot convert argument 1 from 'Collider' to 'Collider &' At the very end, I've tried re watching the video multiple times but the code seems to be fine, anybody know what is going wrong here?
@AdrianWitzil6 жыл бұрын
Hey. I got the same error. Did you manage to resolve it?
@brianmontgomery65026 жыл бұрын
I've got this one too... If I find a solution I'll post it
@brianmontgomery65026 жыл бұрын
Okay the solution I found was to put this line before we check collisions between (platform1 and player) and (platform2 and player in main.cpp: 'Collision (name of your Collider member) = player.getCollider(); After that, just replace player.getCollider with (name of your Collider member) in both checkCollision calls that follow
@brianmontgomery65026 жыл бұрын
As far as I can tell, the compiler just didn't want us to use a member function for this variable. If anyone has a better explanation, I would love to hear it.
@njsfryj6 жыл бұрын
Not a solution, but I did this tutorial a while back on VS community 2015, and the code worked exactly as is, I am redoing it now to get back into SFML with VS community 2017, and I get this exact same error. So, perhaps it is something weird in the newest iteration of the compiler. And your solution did work for me.
@elijahandrushenko63138 жыл бұрын
Can you do a tutorial on gravity, so that when you jump you will fall down and so that standing on blocks matters otherwise you will fall through the screen.
@HilzeVonck8 жыл бұрын
+Elijah Andrushenko Yeah, that is going to be the topic of the next video. :)
@lorow25428 жыл бұрын
When we should expect it? :D
@HilzeVonck8 жыл бұрын
+SmykuPyka As soon as possible. I don't have any time to make an episode right now, but I'll probably have some time next week.
@HiagoRAD6 жыл бұрын
My getCollider function is not working! It has no match for Collider(body). Does anyone had the same issue?
@KKr0lik8 жыл бұрын
I walk by the square, and its not moving. 0 errors or warnigs. whats wrong?
@traveler21587 жыл бұрын
Maybe you should check if you are passing the body in the Collider class by a reference.
@fahdv25976 жыл бұрын
Bro how did you color code visual studio?
@ModerateDev6 жыл бұрын
there's a bunch of tuts on YT
@dreamhollow Жыл бұрын
I like this, but it's a lot more difficult to get to work with smart pointers.
@koraykahraman90312 жыл бұрын
Please keep the tutorial videos coming
@fanut35997 жыл бұрын
error: no matching function for call to 'Collider::CheckCollision(Collider, float)' anybody else had this problem? :(
@TheDorkol53 жыл бұрын
would you happen to know of a way to write *(simple)* non OOP no structs nothing, just bare bones code. of aabb response of 2 regular rectangles. or point me in the right direction? i am desperate. ive spent hours and hours looking for a simple implementation that i can read, i just want to a solid square!!!!!! why is this so hard to find!!!!!!!!!!!!!!!!!. im sure its not ideal but its the only way i can understand it. so many tutorials. or rather always have the starting ccordinates as something crazy like "entity.x.whatever.idontcare = delta.whatever.why?"
@HilzeVonck3 жыл бұрын
You can use the same code as is in the final check collision method. Just also pass in the position for the first aabb as a reference the size of the first aabb, the position of the second aabb as a reference and the size of the second aabb. It shouldn't be hard to convert this to a simple, c like function.
@TheDorkol53 жыл бұрын
@@HilzeVonck converting it is the problem I just wanna *(see)* an example so that I know how it works. Everything being in objects makes it way to hard to pick apart. Also I'm asking in every KZbin video about aabb resolution.
@Herovy0703 жыл бұрын
@ It could look something like this. (keep in mind that I just wrote the code and did not test it, so there might be some small syntax errors) The functionality of the function stays the same, the only thing that I changed is that we now are passing the positions and half sizes in directly, and we are also modifying these positions directly. Just make sure that the position that you pass in is the center of the AABB, and the size is half of the total size of the AABB. bool CheckCollision(sf::Vector2f& thisPosition, sf::Vector2f thisHalfSize, sf::Vector2f& otherPosition, sf::Vector2f otherHalfSize, float push) { float deltaX = otherPosition.x - thisPosition.x; float deltaY = otherPosition.y - thisPosition.y; float intersectX = abs(deltaX) - (otherHalfSize.x + thisHalfSize.x); float intersectY = abs(deltaY) - (otherHalfSize.y + thisHalfSize.y); if (intersectX < 0.0f && intersectY < 0.0f) { push = std::min(std::max(push, 0.0f), 1.0f); if (intersectX > intersectY) { if (deltaX > 0.0f) { thisPosition.x += intersectX * (1.0f - push); otherPosition.x -= intersectX * push; } else { thisPosition.x -= intersectX * (1.0f - push); otherPosition.x += intersectX * push; } } else { if (deltaY > 0.0f) { thisPosition.x += intersectY * (1.0f - push); otherPosition.x -= intersectY * push; } else { thisPosition.x -= intersectY * (1.0f - push); otherPosition.x += intersectY * push; } } } return false; }
@TheDorkol53 жыл бұрын
@@Herovy070 wow to be honest this is way more than I could have asked for thank you I'll check it out when I get home. I appreciate it. I'm gonna go ahead and give you a like and a sub
@christiancarter2552 жыл бұрын
It's not compiling, and it's telling me: "initial value of reference to non-const must be an lvalue" and "'bool Collider::CheckCollision(Collider &, float)': cannot convert argument 1 from 'Collider' to 'Collider &'" :(
@christiancarter2552 жыл бұрын
I figured it out.
@mr.fantasy111 ай бұрын
how @@christiancarter255
@woff57 ай бұрын
@@christiancarter255 what was wrong plz tell us
@christiancarter2557 ай бұрын
@@woff5 I wish I remembered 😔😭
@woff57 ай бұрын
@@christiancarter255 no worries someone had the same problem and had the awnser
@ThePlayerNotJump17 жыл бұрын
You do know that, SFML has functionality to detect collisions right?
@mistermaddock7 жыл бұрын
Frixoe i
@thewhiteprogrammer96332 жыл бұрын
bruh he is detecting aabb to do the tile collsion
@thewhiteprogrammer96332 жыл бұрын
Collsion GetCollider() { return Collsion(shape); there is a error coming collsion.h is not inaccesbile
@lva987 жыл бұрын
Nice job, thanks!
@azaria_phd2 жыл бұрын
10:35 reminder that std::clamp() exists too.
@sc5shout7 жыл бұрын
Im actually more confused then before. You're doing with the centers, others with some shit like min and max and some with x, y, w and h...
@anonymousgaming9115 жыл бұрын
Delta is called Δ in Greek Its the letter D
@johnlight-knight80605 жыл бұрын
I didn't understand the init-list (body(body)) but I will try to understand. :D
@boenaman41544 жыл бұрын
What this means is that the private variable body, will be initialized by the parameter body which is given by the constructor.
@tundrummax62216 жыл бұрын
will this only ever work for squares? will it ever work for rectangles?
@tundrummax62216 жыл бұрын
Nevermind, I can see that it works.
@navaneeth61576 жыл бұрын
holy shit this is soo hard :)
@ahoiioha8 жыл бұрын
Hey, first, its a good tutorial, thank you. But could you pleaseupload your code to github or something else? I'm geting two errors in the code for this two lines: platform1.GetColider().CheckCollision(player.GetCollider(), 0.0f); platform2.GetColider().CheckCollision(player.GetCollider(), 1.0f); Invalid arguments ' Candidates are: bool CheckCollision(Collider &, float) ' Invalid arguments ' Candidates are: bool CheckCollision(Collider &, float) ' invalid initialization of non-const reference of type 'Collider&' from an rvalue of type 'Collider' invalid initialization of non-const reference of type 'Collider&' from an rvalue of type 'Collider' Can anybody help?
@Herovy0708 жыл бұрын
I have actually been working on rewriting all the code to upload to the site that I am building all day. All of the source code for this video should be up there. Here is the link: lucrifi.com/index.php/24-sfml-2-4-for-beginners-12-collision-detection-aabb?start=1. As a note though. The site is not yet finished at all, so if something is wrong or if something does not work, It'll be fixed as soon as possible. I think that the problem is either in the player's GetCollider() function or in the variables that you are passing into the CheckCollision() function. Make sure that the player's GetCollider() is NOT returning a reference to a collider. And make sure that the CheckCollision() DOES have references to the collider (both in the .h and the .cpp).
@HilzeVonck8 жыл бұрын
+Herovy070 whoops, I replied with my secondary YT account. Herovy070s reply is mine.
@ahoiioha8 жыл бұрын
Thanks for the quick respons, I checked your link and checked your code with this page www.qualidator.com/WQM/de/Tools/TextDiff.aspx, I could not see any significant difference to my code, This is the play's GetCollider() Collider GetCollider() { return Collider(body);} and this is CheckCollision() in .h bool CheckCollision(Collider& other, float push); in .cpp bool Collider::CheckCollision(Collider & other, float push){
@rasen_nax8 жыл бұрын
Hi,Thx for this great tutorial! I'm using code::block and got the same error even after copying all files from lucrifi.com/index.php/24-sfml-2-4-for-beginners-12-collision-detection-aabb?start=1. I've solved it by using bool CheckCollision(Collider , float).
@muffinspuffinsEE7 жыл бұрын
Please help! I have the same issue, or if there is anyone else who has a fix for that matter.
@AndrewOBannon8 жыл бұрын
thanks
@ricanteja7 жыл бұрын
Great video but I got a question. Why didn't you just use self.getGlobalBounds().intersects(other.getGlobalBounds()); ? Much simpler for AABB IMHO
@AdrianWitzil6 жыл бұрын
Hey Ricardo, I got an error. Can you give me a hand?
@mosesvalentin16005 жыл бұрын
yeah that's what I thought too
@AdrianWitzil6 жыл бұрын
I did it!!!
@richardlighthouse53287 жыл бұрын
Please I need missing Clip!!!!!!!!!!!!!!!!!!!!!!
@bondjovi4595 Жыл бұрын
Redraw Relocate
@Donaldbeebi4 жыл бұрын
this guy reminds me of pewdiepie lmao
@yagami1160 Жыл бұрын
why was I making this whole lot of stupid stuff
@vedatemin76392 жыл бұрын
platfom1.GetCollider().CheckCollision(player.GetCollider(), 0.0f); platfom2.GetCollider().CheckCollision(player.GetCollider(), 1.0f); player gives an error in my code?