I need to get point that always is behind of player. What should i do?
And second question, how can i set rotation of other player same with me?
Solved Getting point that is behind of player?
Discussion in 'Rust Development' started by HOUGAN_Y, Jan 1, 2018.
-
Any BaseEntity has Bounds, BasePlayer has PlayerEyes. You can move x,y,z anywhere you want to. If your question about Vector3, of course.
-
I understand it. But i need dynamic point. Something like: object.transform.position = player.transform.position + Vector3.back (it is stupid code, like as example)
-
Code:
var pos = player.GetNetworkPosition(); pos.y+=1f; var objectPos = Quaternion.Euler(player.GetNetworkRotation()) * new Vector3(0f, 0f, -0.5f) + pos;
-
Thank you.
-
use
Code:var objectPos = player.transform.position + (player.eyes.rotation * Vector3.back);
-
can explain how to change eye position .? [Change rotation]
-
i mean for a client, to see the changes.