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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - DiscoNic1P

Pages: [1]
1
Window / sprite is outside of window
« on: March 07, 2022, 09:10:22 pm »
I just want to know how can you know when a sprite is outside a view when it is shotted by a character. Also the character can go to the border, so the mainview center.x can be the world min x and the same thing goes to the center y

if ((normalBullets.getPosition().x < player.getPosition().x - mainView.getCenter().x  || normalBullets.getPosition().x > player.getPosition().x + mainView.getCenter().x  || normalBullets.getPosition().y < player.getPosition().y - mainView.getCenter().y || normalBullets.getPosition().y > player.getPosition().y + mainView.getCenter().y))

2
General / How to use correctly the trigger
« on: March 07, 2022, 05:17:08 pm »
I want to use my right trigger from my xbox controller when the player want to shoot a bull. But I don't understand why this line of code is always false. Can someone tell what part is wrong?

if (sf::Joystick::isButtonPressed(0, Joystick::Axis::Z)) inputs.fireMask = true;

Pages: [1]