It would be nice if we could have the ability to scale the shapes evenly by holding control or a key like that,
also if we could have the ability to move all selected movers relatively instead of resetting them all to one position, that would be nice, like move a fan around or something like that
Feature request XY plane
Re: Feature request XY plane
To scale the shapes evenly, you can use the sf::Transformable::setScale method, which takes two parameters: the horizontal and vertical scale factors. If you want to scale the shapes uniformly, you can pass the same value for both parameters. For example, if you want to scale the shape by 50%, you can do: geometry dash
shape.setScale(0.5f, 0.5f);
You can also use the sf::Transformable::scale method, which takes the same parameters, but scales the shape relatively to its current scale. For example, if you want to scale the shape by 50% of its current size, you can do:
shape.scale(0.5f, 0.5f);
You can use the sf::Keyboard::isKeyPressed method to check if a key is pressed, and then apply the scaling accordingly. For example, if you want to scale the shape by 50% when the control key is pressed, you can do something like this:
if (sf::Keyboard::isKeyPressed(sf::Keyboard::LControl))
{
shape.scale(0.5f, 0.5f);
}
To move all selected movers relatively, you can use the sf::Transformable::move method, which takes two parameters: the horizontal and vertical offset. This method moves the shape by the given offset, relative to its current position. For example, if you want to move the shape by 10 pixels to the right and 5 pixels down, you can do:
shape.move(10.f, 5.f);
You can also use the sf::Transformable::setPosition method, which takes the same parameters, but sets the absolute position of the shape. For example, if you want to move the shape to the position (100, 50), you can do:
shape.setPosition(100.f, 50.f);
You can use the sf::Mouse::isButtonPressed method to check if a mouse button is pressed, and then use the sf::Mouse::getPosition method to get the current position of the mouse cursor. You can then use the difference between the current and previous mouse positions to calculate the offset to move the shape. For example, if you want to move the shape by dragging the left mouse button, you can do something like this:
if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
{
sf::Vector2i mousePos = sf::Mouse::getPosition(window);
sf::Vector2f offset = mousePos - prevMousePos;
shape.move(offset);
prevMousePos = mousePos;
}
I hope this helps you improve your program
shape.setScale(0.5f, 0.5f);
You can also use the sf::Transformable::scale method, which takes the same parameters, but scales the shape relatively to its current scale. For example, if you want to scale the shape by 50% of its current size, you can do:
shape.scale(0.5f, 0.5f);
You can use the sf::Keyboard::isKeyPressed method to check if a key is pressed, and then apply the scaling accordingly. For example, if you want to scale the shape by 50% when the control key is pressed, you can do something like this:
if (sf::Keyboard::isKeyPressed(sf::Keyboard::LControl))
{
shape.scale(0.5f, 0.5f);
}
To move all selected movers relatively, you can use the sf::Transformable::move method, which takes two parameters: the horizontal and vertical offset. This method moves the shape by the given offset, relative to its current position. For example, if you want to move the shape by 10 pixels to the right and 5 pixels down, you can do:
shape.move(10.f, 5.f);
You can also use the sf::Transformable::setPosition method, which takes the same parameters, but sets the absolute position of the shape. For example, if you want to move the shape to the position (100, 50), you can do:
shape.setPosition(100.f, 50.f);
You can use the sf::Mouse::isButtonPressed method to check if a mouse button is pressed, and then use the sf::Mouse::getPosition method to get the current position of the mouse cursor. You can then use the difference between the current and previous mouse positions to calculate the offset to move the shape. For example, if you want to move the shape by dragging the left mouse button, you can do something like this:
if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
{
sf::Vector2i mousePos = sf::Mouse::getPosition(window);
sf::Vector2f offset = mousePos - prevMousePos;
shape.move(offset);
prevMousePos = mousePos;
}
I hope this helps you improve your program
Re: Feature request XY plane
tis is a note to the developers right?
Re: Feature request XY plane
developers: Please don't forget about this
being able to see all selected fixtures on the xy plane for scaling and moving all of them relatively would be nice
being able to see all selected fixtures on the xy plane for scaling and moving all of them relatively would be nice