7,613
questions
0
votes
0
answers
14
views
2d vector pointing to a line
I am trying to define when a vector is pointing towards a line or not, but after many trials i don't get the results and the accuracy. Vectors are classified as facing or not facing in a pretty random ...
0
votes
1
answer
25
views
Finding the intersection of two lines a given perpendicular distance from the line of intersection
I'm looking for help to solve the following situation. I have a line segment defined by two points P1 and P2. And I have a ray that starts at P3 and intersects segment P1P2 at P4. I want to calculate ...
0
votes
0
answers
11
views
Regions bounds (created from a Path) are not as expected
I need to check if a point lies inside of a Path describing a 2d shape.
As Path object doesn't have contains function, but Region does and we can construct a Region out of a Path I tried it.
But the ...
0
votes
1
answer
15
views
Getting uniform coordinates from a 3D plane projected as a 2D plane
3d plane projected to a 2d polygon
I have the coordinates of the vertexes P1, P2, P3 and P4 that define a rectangular rectangle.
Those coordinates always define a regular rectangular area and the ...
0
votes
0
answers
12
views
camera project image onto CAD object
I am trying to project on image onto a CAD object using python. I know it is possible in Blender or other 3d softwares, but was trying to find a way to do it in python. Does anyone have any ...
1
vote
2
answers
33
views
frame rate and delta time my sprite animation with SFML in C++
I am studying 2D animation using C++ and SFML library. I use a png spritesheet. The code I wrote as a starting point is the following:
#include <SFML/Graphics.hpp>
#include <iostream>
int ...
-1
votes
0
answers
35
views
I have a gamebreaking bug in my steam multiplayer game made with unity and do not no how to fix it [closed]
I just recently decided to work on a project I started about two years ago (That's why its in unity), and somehow ended up completely breaking the multiplayer part.
What I did (I believe) to make it ...
0
votes
0
answers
28
views
I was basically trying to make my function bounce when it hits the end of the window's sceen but instead it only stops and doesn't bounce
So here, I am trying to implement a Bounce logic whenever the object called Poo (followed a tutorial) hits the end of the screen. I copied my implementation for making any object not go off the screen ...
0
votes
0
answers
19
views
Calculate Moving Average Window over 2D grid in Python - in the top there is a white horizontal area which grows bigger the bigger the chosen window
when I calculate the mean over a 2D moving grid window in Python, but there is a white line just in the top, not on the bottom, right or left, but horizontal, after which there's just white in the ...
0
votes
0
answers
22
views
Hard dropping blocks isn't instant and doesn't put it in the correct spot
Godot Version: v4.3.stable.official [77dcf97d8]
I'm trying to add the ability for blocks (frozen RigidBody2Ds) to be hard-dropped instantly (they get placed on the closest surface directly below them) ...
1
vote
3
answers
42
views
Why does my dragging logic in Unity not work? (only once)
I have a script attached to a GameObject with a Collider2D attached to it as well.
The script should enable me to drag the GameObject while holding down the mouse and "dropping" it by simply ...
2
votes
2
answers
128
views
Python opencv draws polygons outside of lines
[edited] It appears there is a new bug in opencv that introduces an issue causing fillPoly's boundaries to exceed polylines's.
Here is humble code to draw a red filled polygon with a blue outline.
...
1
vote
0
answers
36
views
Weird "bug" in my LOS check, what other algorithm should i use?
Image Link
So as you can see there are some weird dots on the left side, which dont look so pleasing. These weird dots are actually correct but i dont like them. I use a line algorithm with some extra ...
0
votes
0
answers
9
views
How to ensure that a line drawn with GL_LINES is always visible?
I need to draw a waveform exactly 1 pixel thick like Sound Forge or Wavelab does.
For the example, a stereo sine wave is shown at 1:4 and 1:2 ratios.
(make sure to view the pictures in full size)
...
0
votes
1
answer
112
views
"Checkerboarding" effect when rotating sprite in software renderer?
I'm writing a 2D software renderer and when rotating in certain angles I will get a sort of "checkerboarding" effect with my sprite pixels:
To try and get proper rotation, I tried rounding/...