Search the Community
Showing results for tags '2d'.
-
Hi, I need the 2D screen Position of a 3D Node transformation. Can you write me a short code example with unigine matrices form the Player and Node and perspective division to get the NDC coordinates? auto proj = m_player->getProjection(); auto view = m_player->getTransform(); auto obj = instance->second->getNode()->getTransform(); auto projectedPosition = Unigine::Math::Mat4(proj)*view*obj*Unigine::Math::Vec4(0.0, 0.0, 0.0, 1.0); projectedPosition /= glm::abs(projectedPosition.w); x = (projectedPosition.x+1.0f)*0.5f * m_ungineAppHandle->getWidth(); y = (1.f-(projectedPosition.z+1.0f)*0.5f) * m_ungineAppHandle->getHeight(); Thank you in advance, Sebastian
-
Hi What is the workflow for animations of sprites for a 2D game? Do you have any examples and code? Thanks Paul
- 3 replies
-
- sprite animations
- 2d
-
(and 3 more)
Tagged with:
-
And you can lock the scale of one of the sides of the window, or change the size to the maximum value? For example in a chat in horizontal window does not change size, but on the vertical of the possible.
-
I am adding some 2D polygons and lines on a WidgetCanvas. How can I enable anti-aliasing or blend so that the figure do not look pixelated.
- 3 replies
-
- anti-aliasing
- polygon
-
(and 1 more)
Tagged with:
-
Hello. Как мне получить 2D координаты 3D объекта пространстве? Чтоб показать эффекты и статистику над персонажем через GUI, не используя ObjectGUI и ObjectBillboards. ===================== translation from google ===================== How do I get the 2D coordinates of a 3D-object in the viewport? I need this to show the object's effects and stats using GUI but not via ObjectGUI and ObjectBillboards Thanks.