Jump to content

Search the Community

Showing results for tags 'vectors'.

  • 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
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 2 results

  1. Я начинающий в этом движке и не как ни могу понять как узнать позицию обьекта в пространстве, всю документацию пересмотрел и так и не понял как это сделать. Может я просто не могу найти тот класс который мне нужен? using System; using System.Collections; using System.Collections.Generic; using Unigine; [Component(PropertyGuid = "5ff39bf967441504a8a79c93dfaf78d64f635a3d")] public class Test : Component { private void Update() { Node node = World.GetNodeByName("Cuboid"); float worldPos = (float)node.GetWorldDirection(MathLib.AXIS.X); if (Input.IsKeyUp(Input.KEY.E)) { float TransformX = worldPos + 1.0f; Log.Message("Глобальная позиция:" + worldPos + "\n"); Log.Message("Координаты оси X:" + TransformX +"\n"); node.WorldTranslate(TransformX, 0.0f, 0.0f); } } }
  2. I have a PhysicalTrigger in my world and when it's hit, it starts a few tracks that move a few pedestrians around. For this reason I created a few static vectors to keep track of various stats (that are needed while playing). In C++ I use "Unigine::Engine::get()->runWorldFunction" to "playTrack" in the script (see attachment), with with the filename of the track I want to start as argument. Then during the "update" method, all currently running tracks are updated. If I start multiple tracks in short succession, I get the following messages from Unigine: [some lengthy filename].track is being played. There are now 1 tracks running. [another lengthy filename].track is being played. There are now 2 tracks running. Array sizes are: 2, 1, 2, 1. Stats: index = 0, current time = 0. float current_time = single_run_time[index]; terraworld_leek.cpp:69: UserArray::get(): uninitialized key Stack dump: 0x0000: int: 0 Call stack: 00: 0x000047f2 update() Disassemble: float current_time = single_run_time[index]; 0x00004818: pushuavv single_run_time[index] 0x0000481b: setv current_time log.message("Stats: index = %i, current time = %d.\n", index, current_time); 0x0000481d: pushv index 0x0000481f: pushc string: "Stats: index = %i, current time = %d.\n" World::update(): world update function returned 0 (Filenames redacted for readability). The important line here is "Array sizes are: 2, 1, 2, 1." as according to me, it should not be possible for the various arrays to have different sizes (i.e.: it should have been: "Array sizes are: 2, 2, 2, 2."). So if anyone knows what happened here, I would greatly appricate it. Just to be clear, the "playTrack" method is called multiple times from the callback method in PhysicalTrigger (which means that the first 4 lines are all the result of a single trigger being triggered once). terraworld_leek.cpp
×
×
  • Create New...