Search the Community
Showing results for tags 'transform'.
-
WidgetSprite setTransform acting weirdly when width and hegiht are manually set.
mohamed.irshad.k posted a topic in UI Systems
When a WidgetSprite is rotated which has its size set manually by using setWidth() and setHeight() it gives unexpected result. If the size is set to (0, 0) then the rotation works as expected. Below is the sample code: WidgetSprite sprite; int init() { Gui gui = engine.getGui(); sprite = new WidgetSprite(gui,"samples/widgets/textures/background.png"); sprite.setPosition(400, 300); // Uncomment to see the problem. //sprite.setWidth(128); //sprite.setHeight(128); gui.addChild(sprite, GUI_ALIGN_OVERLAP); return 1; } float fAngle = 1.0f; int update() { sprite.setTransform(rotateZ(fAngle)); fAngle += 0.1; return 1; } int shutdown() { delete sprite; return 1; }- 9 replies
-
- WidgetSprite
- Sprite
-
(and 3 more)
Tagged with:
-
Cpu bottleneck in Unigine::Node::setTransform()
sebastian.vesenmayer posted a topic in C++ Programming
Hello, we are running into a cpu bottleneck while updating matrices via setTransform on nodes. We do have 50 instances with about 20 subtransformations for each node, which will be updated every frame. Is there a faster/better way to update positions/orientations. Version is 2.8 , renderer is directx. Thank you for your help.- 11 replies
-
- bottleneck
- node
-
(and 5 more)
Tagged with:
-
Transform Feedback Shader to change MeshObjects
sebastian.vesenmayer posted a topic in Content Creation
We would like to bake different transformation states of multiple ObjectMeshStatic into one to reduce single object count. The Mesh that would be created by transform feedback will only change when one transformation state in the original Node Tree will change. Is it possible to change another MeshObject by a transform feedback shader in Unigine or do we need to do this on cpu side? -
Billboards gizmo is incorrect if parent is transformed
Amerio.Stephane posted a topic in Bug Reports
Hello, When an ObjectBillboards 's billboards are not at the local origin, and the ObjectBillboards itself is a child of a transformed node, then the gizmo of the billboards is not displayed in the correct location. Above, you can see the billboard_3 gizmo is not in the correct place, because the parent WorldExpression has been rotated. The billboard_3 image is in the correct place, though. Thanks- 1 reply
-
- billboards
- transform
-
(and 1 more)
Tagged with:
-
Question about transform data between FBX and imported node in Unigine
p.vaz posted a topic in Content Creation
Hi, In Maya, we exported a FBX file with this tree hierarchy, a root with 4 Locators with 4 childrens cube meshes (see Maya.png). The locators have a translation and the 4 cubes childrens have no translation (see Maya.png). But when we import this FBX into Unigine, we can see that the "NodeDummies" have positions to (0, 0, 0) (see Unigine-JOINTWHEEL1.png) and the children meshes have translated positions, for exmaple (-0.832, 1.597, -0.148) for pCube1 (see pCube1.png). I was expecting that the translation data will be stored on the Nodedummy instead of the ObjectMeshStatic node. Have I missing something ? Thanks, Philippe test.fbx.zip -
I created an animation with a dummy and a spline in Max 2015 , then I exported with Unigine Export Path . Once placed in the scene makes no animation . If I do the same process in Max2013 and exported as .spline , works perfectly in earlier versions of Unigine . What is the correct process of creation to include a World transform Path in my scene?
-
Hello, I'm currently attempting to build a prototype entirely using the C++ API. Right now I'm transferring camera control from UnigineScript into C++. Placing the camera (player) was working fine in UnigineScript, but in C++ it hasn't been going well. I'm running into a problem when using the command: player->setTransform(setTo(UNIGINE_VEC3(0.0, 0.0, 20.0), UNIGINE_VEC3(0.0, 1.0, -1.0), vec3(0.0, 0.0, 1.0))); The second parameter is supposed to control the direction of the camera/player. However, my player points in the -z direction no matter how I change it. Even if I switch the argument to UNIGINE_VEC3(0.0, 1.0, 1.0), the camera points in the -z direction. I've tried many different numbers as well as changing my argument to a unit vector, but the camera always points straight down towards -z. Is this an error with the C++ API or am I doing something else wrong? Thanks!