New answers tagged c++
0
votes
3D Impulse based collision resolution not behaving correctly, what could be wrong?
The problem was related to the orientation quaternion. Nothing related to the physics code.
I figured it out by applying forces to specific axes. I realized that nothing worked when the force was a ...
2
votes
Accepted
Godot 3.5: Web Build using custom GDNative C++ Library does not work due to `dlopen` error and failed linking
After some detailed checking of the emcc compiler flags and verifying their functionality in the documentation, I realized that the Godot Webexport does not produce ...
0
votes
In Unreal Engine 5, how do I include and use UPlayMontageCallbackProxy::CreateProxyObjectForPlayMontage in C++?
I never used the UPlayMontageCallbackProxy but Error LNK2019 usually means you are lacking the include.
Looking at the docs, you ...
1
vote
How do I Rigidbody.AddForce(Vector3) in Unreal Engine?
If you want to add a one-time force to the object you should use the AddImpulse function instead of the AddForce, because AddForce applies a force continually.
To use the AddImpulse function you need ...
1
vote
Accepted
Simulated light for a 2D tile-map with just SDL2?
I think what you want is to create a black texture with the same size as your screen, set it as the render target, render blurry white circles to it at the locations of the light sources, with the ...
0
votes
What is the best way to implement a scene manager?
I am far away from being a pro, so excuse me if this is nonsense...
But how about seeing a scene as a node and the manager as a kind of graph?
The graph/manager could have a method to "search&...
0
votes
What is the best way to implement a scene manager?
One possible alternative, given that the only reason for the forward declaration is because you want IScene to be able to change the active scene from within its ...
0
votes
Accepted
What is the best way to implement a scene manager?
Forward declaring is totally OK. The alternative would be exactly what you pointed out, cyclic dependencies (assuming that you have #include in your ...
0
votes
c++ SFML Window in std::thread ignore animation
I found the problem. I forgot to limit the frame rate, after adding:
setFramerateLimit(60) it all works fine.
3
votes
Accepted
Increased CPU usage when rendering sprites
Without refactoring the code the first thing would be to avoid repeatedly setting uniforms that don't change such as:
...
0
votes
Top 50 recent answers are included
Related Tags
c++ × 4257opengl × 999
directx × 308
sfml × 260
sdl × 227
directx11 × 209
architecture × 202
sdl2 × 183
collision-detection × 180
2d × 166
unreal-4 × 148
physics × 132
textures × 125
shaders × 122
3d × 114
mathematics × 114
rendering × 112
glsl × 104
hlsl × 84
directx9 × 83
software-engineering × 81
c × 81
entity-system × 79
graphics × 75
box2d × 75