1. Code:
    var destination = new UnityEngine.Vector3(100,100,100).normalized;
    I have also tried just Vector3, with out normalized... not sure what to do or where to look. The DLL mentions Vector 3 a lot. Any ideas how to get this to work?
     
  2. Wulf

    Wulf Community Admin

    Try global.UnityEngine instead.
     
  3. was looking at var UnityEngine = importNamespace("UnityEngine"); but no luck there... will try global and update the posts
    [DOUBLEPOST=1463773928][/DOUBLEPOST]global is not defined.
    Code:
    var bumFights = {
        Title : "BumFights",
        Author : "Brimstone",
        Version : V(0,1,0),
        Description : "Let's spawn some people in and give them weapons",
        HasConfig : false,
      
        Init: function (){
            print("[BumFights]Added Chat Commands");
            command.AddChatCommand('test', this.Plugin, 'Smile')
            },
        Smile: function (player, command, arg)
        {
            rust.SendChatMessage(player, "bumFights", "SMILEEEe", "0");
            var destination = global.UnityEngine.Vector3(100,100,100);
            //rust.ForcePlayerPosition(player, destination);
        },
    }
    global is not defined
     
    Last edited by a moderator: May 20, 2016
  4. A normalized vector is probably not what you're looking for.
    A normalized vector is a vector with a length of 1, (n = v / |v|)
     
    Last edited by a moderator: May 20, 2016
  5. That is interesting and complex lol....

    I kind of just gave up on making a variable reference a unity vector and just used oxide's rust.ForcePlayerPosition(player, 100,100,100);

    still kind of annoying I could not get UnityEngine to work