Jump to content

Search the Community

Showing results for tags 'rotation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feeback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • Showcase
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 6 results

  1. currently node.GetRotation() returns the rotation in type quat, i want to make changes to the rotation is there any way i can get the rotation in euler angles like Quaternion.Euler from unity?
  2. I've been experimenting with the Unigine Community edition (Very excited to be able to use it, finally), and I have come across an issue that I cannot seem to resolve. I am attempting to use a Mesh Water node to simulate a lake. Tuning the displacement parameters, I can get a decent waveform, but when I try and use the direction parameter to change the orientation of the wave, the surface becomes broken and noisy. My models are exported from 3DS Max, and have their transforms centered at zero and scales at 100%. They are simple planes with a large number of segments. In Unigine, I have them set to Z-Up and X-Forward, and they are oriented correctly in the world without any rotation. When I attempt to rotate the direction of the Gerstner waves on the surface, they stretch along the opposing axis, but they do not properly rotate. Is there a procedure that I missed in the export process? This issue occurs with a plane generated fresh in Unigine, as well. That suggests to me that rather than being an issue of how I export my geometry, it is an error in the math. I've encountered this before in my own attempts at creating Gerstner displacement, but before if was typically due to an incorrectly exported mesh. This applies to those created within Unigine as well, so I'm at a loss.
  3. Hello everyone, I am trying to make a camera that can rotate left and right in world space, by holding the middle mouse button and dragging. This is the first thing I've been trying to make in Unigine. It works for a while but it has an issue, where the rotation slowly causes the camera to look directly into the horizon once it gets there the rotation also starts to roll the camera until a 90 degree roll is realized. The camera starts at coordinates 0,0,0, rotation 50,0,0. This is the code that is supposed to do the rotation. (That is inside of the UpdatePhysics-method on a component attached to the camera's parent). if (EnableMouseRotation && Input.IsMouseButtonPressed(Input.MOUSE_BUTTON.MIDDLE)) { vec3 rotation = vec3.UP * Input.MouseDelta.x * node.GetRotation(); node.Rotate(rotation); } I want the rotation to be like illustrated in this gif, and it does that for a while, it seems. (alternatively view mp4 instead) Now this is actually what the code does in-game. (alternatively view the mp4) I am not sure if this is a bug or just me being very bad at math, but I suspect I just don't know what I am doing here. I've been looking at it for several hours trying to do it in different ways, then last night I decided to see if I could do it in Unity instead, and that works perfectly fine using this code. if (Input.GetMouseButton((int)MouseButton.MiddleMouse)) { if (lastMousePosition.HasValue && lastMousePosition != Input.mousePosition) { Vector3 delta = lastMousePosition.Value - Input.mousePosition; transform.Rotate(new Vector3(0, delta.x, 0), Space.World); } lastMousePosition = Input.mousePosition; } So that is essentially what I want to achieve in Unigine, I note there that it is an actual world space rotation, for some reason whenever I try to use node.WorldRotate() it just doesn't do what I want at all. If someone could tell me what I need to do differently I would really appreciate that. I've attached the entire component code and the world file. Thank you test.world StrategicCameraController.cs
  4. WorldRotate(vec3) scales object

    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
  5. Impostors don't have correct rotation

    I've noticed recently that my billboards aren't lining up with the geometry clutter versions. There's a rotation z setting in the clutter, but no corresponding setting in the grass object to determine which of the atlas images to load. As a result, billboards for irregularly shaped foliage often appear with the wrong image, and it's very noticeable.
  6. Hello, Got some queries that formed when I was trying to understand unigine animation and skinner tool. 1. Ragdoll effect : I want to play a hurt arm animation where the gun-holding arm of an AI character is shot and hanging loosely (thinking of adding ragdoll effect on this arm). I'd also like it to use the character's other arm to hold the hurt arm. How can I keep the free arm attached properly to the hurt one? Should I be using a bone to bone attachment or something similar? Will the ragdolled arm make the attachment imprecise? 2. Character rotation and translation : Does Unigine require in-place animation with translation done through code or can I add forward movement within the animation itself? Same case with rotation, is this done through code? Or do I use animation interpolation between 4 animations rotated towards cardinal axes? 3. Animation speed factor : I need to do a looping animation with non-uniform speed within each loop, where character is hurt and limping or dragging towards destination (as against a uniform-speed running anim). Assuming that character translation should be done from code, how can I do it without making it look like its sliding? Hope these make some sense! Thanks.
×
×
  • Create New...