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 - ohgodmanyo

Pages: [1]
1
General / Trying to sync rocket with rocket launcher
« on: February 03, 2022, 10:20:56 pm »
Hello, I am trying to get the rocket to sync up with the rocket launcher. What my code does, is it sets the rocket to the position of the player, sets it's angle to the rocket launcher's angle, and then tries to move it a bit forward based on it's angle so that the rocket looks like it just got launched out of the launcher. The only thing that doesn't work is that the rocket is moving multiple times faster than the actual rocket launcher for some reason. The only thing that messed this up was when I tried to move the rocket forward from the player using sin and cos. Please help me sync them up so that the rocket looks like it's being fired from the rocket launcher.


    this->rocket->updatePos(this->player->getPos());
    this->rocket->updateRot(this->launcher->getRot());
    this->rocket->updatePos(sf::Vector2f(this->player->getPos().x + (25 * cos(this->rocket->getRot())), this->player->getPos().y + (25 * -sin(this->rocket->getRot()))));

 

Video of what is going on: https://youtu.be/1meZuP1ebW4

2
General / Need help with crosscompiling from linux to windows via mingw
« on: January 15, 2022, 10:26:40 pm »
I get this issue when trying to compile my project via mingw.

https://pastebin.com/raw/YPzk50BZ

The dlls are GCC 7.3.0 MinGW (DW2) - 32-bit, and I do currently have them in my build directory. I am currently on arch linux and I have installed sfml from: https://aur.archlinux.org/packages/mingw-w64-sfml/

3
General / Help with pixel perfect collision on convex shapes.
« on: June 28, 2021, 05:22:52 pm »
When I use the intersects() function, it only uses the hitboxes as a rectangle i think and it isn't accurate enough. I have already heard of flood fill and all of that, but I am struggling with implementing it. I would appreciate if someone could just put the code down there to help me get perfect pixel collisions on convex polygons.

Pages: [1]
anything