Search the Community
Showing results for tags 'rotate'.
-
Steps: -Add the following component to a primitive box -Use space / enter to trigger WorldRotate using System; using System.Collections; using System.Collections.Generic; using Unigine; [Component(PropertyGuid = "24c7af91cfafa3bcc0f32beb363ad04ec4089b55")] public class BugTester : Component { private void Update() { // write here code to be called before updating each render frame if (Input.IsKeyDown(Input.KEY.SPACE) || Input.IsKeyPressed(Input.KEY.RETURN)) { node.WorldRotate(new vec3(0,0,0.1f)); } Log.Message("rotation " + node.GetRotation()); Log.Message("position " + node.Position); Log.Message("scale " + node.Scale); } } With a Z rotation input vector the cube scales down on X and Y axises until the scale and rotation properties turn into NaN. Unigine 2.11.0.0 Community C# (edit, seems to work the same in C++ version too) WorldRotate.mp4
-
Hi all. I have widgetSprite. I added the layer. Using WidgetSprite::setLayerTransform I rotate it. sprite_env_but.setLayerTransform(1, rotateZ(30.0f*sl_environment.getValue())); But it takes a pivot point in the upper left corner. How to rotate around its center? Thanks.
- 2 replies
-
- widgetSprite
- transform layer
-
(and 2 more)
Tagged with: