Hello, I am trying to create a function that allows adding chairs to objects. When I add the father I can climb in it, the problem comes when I want to change its rotation or move the chair a bit as such. Then this is displayed on the site that I want but will not let me ride on it.
For example, the code I use is as follows.
First of all, thank you for your time.Code:BaseEntity chair = GameManager.server.CreateEntity("assets/prefabs/deployable/chair/chair.deployed.prefab", playerPos); chair.Spawn(); chair.transform.localEulerAngles = new Vector3(0, 265, 260); chair.transform.localPosition = new Vector3(-0.4f, 5.0f, -0.0f); chair.gameObject.AddComponent(typeof(Rigidbody)); ((Rigidbody)chair.gameObject.GetComponent(typeof(Rigidbody))).isKinematic = true; chair.SetParent(entity);
[DOUBLEPOST=1507151860][/DOUBLEPOST]Fixed, you should simply remove the local
Code:chair.transform.eulerAngles = new Vector3(0, 265, 270); chair.transform.position = new Vector3(-0.4f, 0.0f, -0.3f);
Problem mount Chair localposition/angles
Discussion in 'Rust Development' started by ninco90, Oct 4, 2017.