I get position foundation
bool FindRayEntity(Vector3 sourcePos, Vector3 sourceDir, out Vector3 point, out BaseEntity entity)
{
RaycastHit hitinfo;
entity = null;
point = default(Vector3);
if (!Physics.Raycast(sourcePos, sourceDir, out hitinfo, 1000f, rayLayer)) { return false; }
point = hitinfo.point;
entity = hitinfo.GetEntity();
return true;
}
Set position foundation in the same Vector3 and the Quaternion
GameManager.server.CreateEntity("assets/prefabs/building core/foundation/foundation.prefab",
Vector3(entity.transform.position),
Quaternion(entity.transform.rotation))
but the foundation set at an angle
Getting set position angle?
Discussion in 'Rust Development' started by alberologic, Jul 11, 2016.
