I do the trunk for the car, the problem is that the texture of the chest does not move with the car. Tried isKinematic = true; But then the car pushes forward with furious speed.
The entity of the trunk is moving (when I look at the trunk I can loot the chest, but the texture of the chest remains in place of the spawn car)
Or maybe... How i can set entity invisible?Code:void SpawnGift(Vector3 pos, BasePlayer player) { BaseEntity gift = GameManager.server.CreateEntity("assets/content/vehicles/sedan_a/sedantest.entity.prefab", pos, new Quaternion(), true); gift.Spawn(); data.FreeSedanData[player.userID].SedanId = gift.net.ID.ToString(); pos.x = pos.x; pos.y = pos.y; pos.z = pos.z; var box = GameManager.server.CreateEntity( "assets/prefabs/deployable/large wood storage/box.wooden.large.prefab", pos, new Quaternion(), true); box.gameObject.Identity(); box.SetParent(gift); box.transform.Translate(0, 0.5f, -2); box.Spawn(); }
I also use GetComponent<Renderer>();
Code:private Color colorTrans; colorTrans = new Color (1, 1, 1, 0.5f); box.gameObject.GetComponent<Renderer>().material.color = colorTrans;But get error: NullReferenceException: Object reference not set to an instance of an object
Moving entity texture with entity?
Discussion in 'Rust Development' started by VooDoo 3, Oct 26, 2017.
-
becoming invisible >>
Code:// BaseNetworkable public bool limitNetworking
-
-
-
Thank you for attentionLast edited by a moderator: Oct 26, 2017 -
I solved the problem in a different way, with another prefab everything is fine.
There was another problem ...
If you designate the machine as the parent of the chair, you can not sit on a chair, if on the contrary, you can not get into the car.
Label Mount appears, but you can not sit down
Can someone help