Tag Info

New answers tagged

0

I would guess this is due to the way triggers are implemented by your hardware. Often they are a single axis, with unpressed at -, fully pressed at +, and 0 when they are halfway pressed. This certainly happens with my classic Xbox controllers, and can cause issues when software thinks you are holding the axis fully negative when in fact you are not touching ...


0

SDL2 is intended to deliver all these events, not to block one while another is active. SDL2 does deliver keyboard repeats. I use almost the same code, and I see repeated keys, but also mouse movement events interspersed. You could filter out keyboard repeats by doing } else if (event.type == SDL_KEYDOWN) { if(event.key.repeat == 0) { ...


0

What you need to do to implement sliding: 1) find the exact location of collision 2) find the normal of the collision 3) move the object to the location of collision 4) set the velocity of object opposite of the collision normal to 0; (or you need projection if you are working with non axis aligned stuff) 5) move the object again using the new adjusted ...


1

Changing the working directory worked for me recently: Go to Product -> Scheme -> Edit Scheme. Then click Run on the left hand panel and then finally enter the path of the files under Working Directory. All of your paths are then relative to the path you entered.



Top 50 recent answers are included