Hello everybody
i create an airdrop and set the position. But the position is wrong.
config_airdroppos //Vector3
How i set the airdrop position:
How i call the airdrop:Code:config_airdroppos = player.transform.position; SendReply(player, "Airdrop position set");
But both airdrop are differntly and no one at the position i set. Whats wrong?Code:var box = GameManager.server.CreateEntity("assets/prefabs/npc/cargo plane/cargo_plane.prefab", config_airdroppos, new Quaternion(), true); var box2 = GameManager.server.CreateEntity("assets/prefabs/npc/cargo plane/cargo_plane.prefab", config_airdroppos, new Quaternion(), true); box.Spawn(true); box2.Spawn(true); SendReply(player, "Airdroptest started");
Solved Airdrop position wrong when spawning
Discussion in 'Rust Development' started by Sir BenSon, Aug 17, 2016.
-
ok i get it work. You must set the airdrop position seperatly
Code:BaseEntity planeEntity1 = GameManager.server.CreateEntity("assets/prefabs/npc/cargo plane/cargo_plane.prefab", new Vector3(), new Quaternion(1f, 0f, 0f, 0f)); BaseEntity planeEntity2 = GameManager.server.CreateEntity("assets/prefabs/npc/cargo plane/cargo_plane.prefab", new Vector3(), new Quaternion(1f, 0f, 0f, 0f)); CargoPlane plane1 = planeEntity1.GetComponent<CargoPlane>(); CargoPlane plane2 = planeEntity2.GetComponent<CargoPlane>(); plane1.InitDropPosition(config_airdroppos); plane2.InitDropPosition(config_airdroppos); planeEntity1.Spawn(true); planeEntity2.Spawn(true);
-
You can mark your post solved by going to "Thread Tools" at the top of your first post, "Edit Title" and changing "(No prefix)" to "Solved".
-
Ah ok thanks
-