|
Результаты поиска
|
|
| seaman | Дата: Понедельник, 25 Марта 2013, 18:52 | Сообщение # 781 | Тема: межплатформенная 2d либа |
|
старожил
Сейчас нет на сайте
| Цитата и нет такой элементарщины? Ну это потому, что никому не нужно. Есть Vectrosity, которым в принципе такое сделать можно.
|
|
|
| |
| seaman | Дата: Воскресенье, 24 Марта 2013, 22:07 | Сообщение # 782 | Тема: Мобильные платформы |
|
старожил
Сейчас нет на сайте
| Цитата А как iOS компилировать из-под WinXP32 ?? Хакинтош + Xcode
|
|
|
| |
| seaman | Дата: Воскресенье, 24 Марта 2013, 18:11 | Сообщение # 783 | Тема: Проблема с водой. |
|
старожил
Сейчас нет на сайте
| Не использовать в скриптах свойства, которых нет в материале.
|
|
|
| |
| seaman | Дата: Пятница, 22 Марта 2013, 22:50 | Сообщение # 784 | Тема: Вопрос-[ответ] по Unity |
|
старожил
Сейчас нет на сайте
| Цитата что он от меня хочет когда пробую поставит лайтмапу Ну как я понял - это: Цитата Mark the objects you want to lightmap as static.
|
|
|
| |
| seaman | Дата: Пятница, 22 Марта 2013, 15:34 | Сообщение # 785 | Тема: Воссоздание сайта Unity3dRus после длительного бездействия |
|
старожил
Сейчас нет на сайте
| А как вы на Hetzner бесплатный хостинг получили? Или какой реселлер дает? Тогда реклама появится точно. Нашел реселлера: xlhost ru - тоже платно. Как бесплатно то взяли? ЗЫ: а вирус у меня один раз таки выскочил. ЗЗЫ: Цитата Тоесть, если бы были посетители, сайт бы непосредственно развивался А с чего им взяться? Для того, чтобы люди пошли - нужно массу эксклюзивного контента и постоянно пополняемого. С монстрами типа unity3d ru или с этим сайтом конкурировать ох как сложно.
|
|
|
| |
| seaman | Дата: Среда, 20 Марта 2013, 20:56 | Сообщение # 786 | Тема: Вопросы по юньке |
|
старожил
Сейчас нет на сайте
| Цитата (NeToX) Наверно из-за таких постов вам и замечания влепляют. Терпеть не могу лентяев, которым влом открыть учебник и посмотреть хоть что-то самому. А на замечания мне плевать.
|
|
|
| |
| seaman | Дата: Среда, 20 Марта 2013, 16:43 | Сообщение # 787 | Тема: Вопросы по юньке |
|
старожил
Сейчас нет на сайте
| Цитата Можно ли использовать эту функцию для отображение на экране переменной таймера? Откройте мануал - почитайте хотя бы про эту функцию. Учите программирование. И не задавайте таких вопросов.
|
|
|
| |
| seaman | Дата: Вторник, 19 Марта 2013, 09:21 | Сообщение # 788 | Тема: Photon animation. |
|
старожил
Сейчас нет на сайте
| Тролли RPC во встроенной сети Юнити. В фотоне несколько по иному. Там нужно посылать сообщения встроенными средствами фотона. Разбирай примеры фотона - там все достаточно понятно.
|
|
|
| |
| seaman | Дата: Воскресенье, 17 Марта 2013, 17:34 | Сообщение # 789 | Тема: ИЗМЕНИТЬ ПУТЬ УСТАНОВКИ |
|
старожил
Сейчас нет на сайте
| Ну только могу посоветовать написать батник для запуска Юнити, который изменяет ключ реестра: HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal на нужный. Не забыть после запуска Юнити вернуть его на дефолтный, иначе остальные проги будут глючить.
|
|
|
| |
| seaman | Дата: Воскресенье, 17 Марта 2013, 16:34 | Сообщение # 790 | Тема: ИЗМЕНИТЬ ПУТЬ УСТАНОВКИ |
|
старожил
Сейчас нет на сайте
| Цитата Как переназначить долбаный МОИ ДОКУМЕНТЫ ? XP - Правой кнопкой на "Мои документы" (можно прямо на рабочем столе) - Свойства - Переместить Win7 - открываем проводник - ищем "Мои документы" - правой конпкой - свойства - Расположение - переместить
|
|
|
| |
| seaman | Дата: Вторник, 12 Марта 2013, 21:46 | Сообщение # 791 | Тема: Положение курсора мыши на экране Unity |
|
старожил
Сейчас нет на сайте
| А неважно где она работает. Просто в ней Event.mousePosition верно. Во всяком случае так пишут на офсайте. Проверьте. Ну или попробуйте OnSceneGUI
Сообщение отредактировал seaman - Вторник, 12 Марта 2013, 21:51 |
|
|
| |
| seaman | Дата: Вторник, 12 Марта 2013, 21:24 | Сообщение # 792 | Тема: Положение курсора мыши на экране Unity |
|
старожил
Сейчас нет на сайте
| Тут с Вами станешь догадливым! Вот почему бы сразу не написать, что надо позицию мыши в окне редактора? Вот зачем было мозги компостировать? 1. В скрипт редактора вставляешь OnInspectorGUI() 2. В нем анализируешь Event.mousePosition
|
|
|
| |
| seaman | Дата: Воскресенье, 10 Марта 2013, 18:33 | Сообщение # 793 | Тема: Вопрос-[ответ] по Unity |
|
старожил
Сейчас нет на сайте
| Цитата Та нет не рабоает это. У всех работает, у Вас нет. Может дело в Вас? Еще раз - не Vector3.forward, а именно transform.forward!
|
|
|
| |
| seaman | Дата: Четверг, 07 Марта 2013, 21:24 | Сообщение # 794 | Тема: 2 d платформер |
|
старожил
Сейчас нет на сайте
| Цитата Детали по ссылке (http://unity3d.com/Documentation/Components/classCharacterController.html) Может Вы имели в виду PlatformerController? Вот он: Код // Does this script currently respond to Input? var canControl = true;
// The character will spawn at spawnPoint's position when needed. This could be changed via a script at runtime to implement, e.g. waypoints/savepoints. var spawnPoint : Transform;
class PlatformerControllerMovement { // The speed when walking var walkSpeed = 3.0; // when pressing "Fire1" button (control) we start running var runSpeed = 10.0;
var inAirControlAcceleration = 1.0;
// The gravity for the character var gravity = 60.0; var maxFallSpeed = 20.0;
// How fast does the character change speeds? Higher is faster. var speedSmoothing = 5.0;
// This controls how fast the graphics of the character "turn around" when the player turns around using the controls. var rotationSmoothing = 10.0;
// The current move direction in x-y. This will always been (1,0,0) or (-1,0,0) // The next line, @System.NonSerialized , tells Unity to not serialize the variable or show it in the inspector view. Very handy for organization! @System.NonSerialized var direction = Vector3.zero;
// The current vertical speed @System.NonSerialized var verticalSpeed = 0.0;
// The current movement speed. This gets smoothed by speedSmoothing. @System.NonSerialized var speed = 0.0;
// Is the user pressing the left or right movement keys? @System.NonSerialized var isMoving = false;
// The last collision flags returned from controller.Move @System.NonSerialized var collisionFlags : CollisionFlags;
// We will keep track of an approximation of the character's current velocity, so that we return it from GetVelocity () for our camera to use for prediction. @System.NonSerialized var velocity : Vector3; // This keeps track of our current velocity while we're not grounded? @System.NonSerialized var inAirVelocity = Vector3.zero;
// This will keep track of how long we have we been in the air (not grounded) @System.NonSerialized var hangTime = 0.0; }
var movement : PlatformerControllerMovement;
// We will contain all the jumping related variables in one helper class for clarity. class PlatformerControllerJumping { // Can the character jump? var enabled = true;
// How high do we jump when pressing jump and letting go immediately var height = 1.0; // We add extraHeight units (meters) on top when holding the button down longer while jumping var extraHeight = 4.1; // This prevents inordinarily too quick jumping // The next line, @System.NonSerialized , tells Unity to not serialize the variable or show it in the inspector view. Very handy for organization! @System.NonSerialized var repeatTime = 0.05;
@System.NonSerialized var timeout = 0.15;
// Are we jumping? (Initiated with jump button and not grounded yet) @System.NonSerialized var jumping = false; @System.NonSerialized var reachedApex = false; // Last time the jump button was clicked down @System.NonSerialized var lastButtonTime = -10.0; // Last time we performed a jump @System.NonSerialized var lastTime = -1.0;
// the height we jumped from (Used to determine for how long to apply extra jump power after jumping.) @System.NonSerialized var lastStartHeight = 0.0; }
var jump : PlatformerControllerJumping;
private var controller : CharacterController;
// Moving platform support. private var activePlatform : Transform; private var activeLocalPlatformPoint : Vector3; private var activeGlobalPlatformPoint : Vector3; private var lastPlatformVelocity : Vector3;
// This is used to keep track of special effects in UpdateEffects (); private var areEmittersOn = false;
function Awake () { movement.direction = transform.TransformDirection (Vector3.forward); controller = GetComponent (CharacterController); Spawn (); }
function Spawn () { // reset the character's speed movement.verticalSpeed = 0.0; movement.speed = 0.0; // reset the character's position to the spawnPoint transform.position = spawnPoint.position; }
function OnDeath () { Spawn (); }
function UpdateSmoothedMovementDirection () { var h = Input.GetAxisRaw ("Horizontal"); if (!canControl) h = 0.0; movement.isMoving = Mathf.Abs (h) > 0.1; if (movement.isMoving) movement.direction = Vector3 (h, 0, 0); // Grounded controls if (controller.isGrounded) { // Smooth the speed based on the current target direction var curSmooth = movement.speedSmoothing * Time.deltaTime; // Choose target speed var targetSpeed = Mathf.Min (Mathf.Abs(h), 1.0); // Pick speed modifier if (Input.GetButton ("Fire2") && canControl) targetSpeed *= movement.runSpeed; else targetSpeed *= movement.walkSpeed; movement.speed = Mathf.Lerp (movement.speed, targetSpeed, curSmooth); movement.hangTime = 0.0; } else { // In air controls movement.hangTime += Time.deltaTime; if (movement.isMoving) movement.inAirVelocity += Vector3 (Mathf.Sign(h), 0, 0) * Time.deltaTime * movement.inAirControlAcceleration; } }
function FixedUpdate () { // Make sure we are absolutely always in the 2D plane. transform.position.z = 0;
}
function ApplyJumping () { // Prevent jumping too fast after each other if (jump.lastTime + jump.repeatTime > Time.time) return;
if (controller.isGrounded) { // Jump // - Only when pressing the button down // - With a timeout so you can press the button slightly before landing if (jump.enabled && Time.time < jump.lastButtonTime + jump.timeout) { movement.verticalSpeed = CalculateJumpVerticalSpeed (jump.height); movement.inAirVelocity = lastPlatformVelocity; SendMessage ("DidJump", SendMessageOptions.DontRequireReceiver); } } }
function ApplyGravity () { // Apply gravity var jumpButton = Input.GetButton ("Jump"); if (!canControl) jumpButton = false; // When we reach the apex of the jump we send out a message if (jump.jumping && !jump.reachedApex && movement.verticalSpeed <= 0.0) { jump.reachedApex = true; SendMessage ("DidJumpReachApex", SendMessageOptions.DontRequireReceiver); } // * When jumping up we don't apply gravity for some time when the user is holding the jump button // This gives more control over jump height by pressing the button longer var extraPowerJump = jump.jumping && movement.verticalSpeed > 0.0 && jumpButton && transform.position.y < jump.lastStartHeight + jump.extraHeight && !IsTouchingCeiling (); if (extraPowerJump) return; else if (controller.isGrounded) movement.verticalSpeed = -movement.gravity * Time.deltaTime; else movement.verticalSpeed -= movement.gravity * Time.deltaTime; // Make sure we don't fall any faster than maxFallSpeed. This gives our character a terminal velocity. movement.verticalSpeed = Mathf.Max (movement.verticalSpeed, -movement.maxFallSpeed); }
function CalculateJumpVerticalSpeed (targetJumpHeight : float) { // From the jump height and gravity we deduce the upwards speed // for the character to reach at the apex. return Mathf.Sqrt (2 * targetJumpHeight * movement.gravity); }
function DidJump () { jump.jumping = true; jump.reachedApex = false; jump.lastTime = Time.time; jump.lastStartHeight = transform.position.y; jump.lastButtonTime = -10; }
function UpdateEffects () { wereEmittersOn = areEmittersOn; areEmittersOn = jump.jumping && movement.verticalSpeed > 0.0; // By comparing the previous value of areEmittersOn to the new one, we will only update the particle emitters when needed if (wereEmittersOn != areEmittersOn) { for (var emitter in GetComponentsInChildren (ParticleEmitter)) { emitter.emit = areEmittersOn; } } }
function Update () { if (Input.GetButtonDown ("Jump") && canControl) { jump.lastButtonTime = Time.time; }
UpdateSmoothedMovementDirection(); // Apply gravity // - extra power jump modifies gravity ApplyGravity ();
// Apply jumping logic ApplyJumping (); // Moving platform support if (activePlatform != null) { var newGlobalPlatformPoint = activePlatform.TransformPoint(activeLocalPlatformPoint); var moveDistance = (newGlobalPlatformPoint - activeGlobalPlatformPoint); transform.position = transform.position + moveDistance; lastPlatformVelocity = (newGlobalPlatformPoint - activeGlobalPlatformPoint) / Time.deltaTime; } else { lastPlatformVelocity = Vector3.zero; } activePlatform = null; // Save lastPosition for velocity calculation. lastPosition = transform.position; // Calculate actual motion var currentMovementOffset = movement.direction * movement.speed + Vector3 (0, movement.verticalSpeed, 0) + movement.inAirVelocity; // We always want the movement to be framerate independent. Multiplying by Time.deltaTime does this. currentMovementOffset *= Time.deltaTime; // Move our character! movement.collisionFlags = controller.Move (currentMovementOffset); // Calculate the velocity based on the current and previous position. // This means our velocity will only be the amount the character actually moved as a result of collisions. movement.velocity = (transform.position - lastPosition) / Time.deltaTime; // Moving platforms support if (activePlatform != null) { activeGlobalPlatformPoint = transform.position; activeLocalPlatformPoint = activePlatform.InverseTransformPoint (transform.position); } // Set rotation to the move direction if (movement.direction.sqrMagnitude > 0.01) transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation (movement.direction), Time.deltaTime * movement.rotationSmoothing); // We are in jump mode but just became grounded if (controller.isGrounded) { movement.inAirVelocity = Vector3.zero; if (jump.jumping) { jump.jumping = false; SendMessage ("DidLand", SendMessageOptions.DontRequireReceiver);
var jumpMoveDirection = movement.direction * movement.speed + movement.inAirVelocity; if (jumpMoveDirection.sqrMagnitude > 0.01) movement.direction = jumpMoveDirection.normalized; } }
// Update special effects like rocket pack particle effects UpdateEffects (); }
function OnControllerColliderHit (hit : ControllerColliderHit) { if (hit.moveDirection.y > 0.01) return; // Make sure we are really standing on a straight platform // Not on the underside of one and not falling down from it either! if (hit.moveDirection.y < -0.9 && hit.normal.y > 0.9) { activePlatform = hit.collider.transform; } }
// Various helper functions below: function GetSpeed () { return movement.speed; }
function GetVelocity () { return movement.velocity; }
function IsMoving () { return movement.isMoving; }
function IsJumping () { return jump.jumping; }
function IsTouchingCeiling () { return (movement.collisionFlags & CollisionFlags.CollidedAbove) != 0; }
function GetDirection () { return movement.direction; }
function GetHangTime() { return movement.hangTime; }
function Reset () { gameObject.tag = "Player"; }
function SetControllable (controllable : boolean) { canControl = controllable; }
// Require a character controller to be attached to the same game object @script RequireComponent (CharacterController) @script AddComponentMenu ("2D Platformer/Platformer Controller")
|
|
|
| |
| seaman | Дата: Четверг, 07 Марта 2013, 20:59 | Сообщение # 795 | Тема: 2 d платформер |
|
старожил
Сейчас нет на сайте
| Вы урок читали? Character Controller - это стандартный компонент Юнити. В уроке даже есть ссылка на ануал по нему.
|
|
|
| |
| seaman | Дата: Четверг, 07 Марта 2013, 18:52 | Сообщение # 796 | Тема: Как оптимизировать игру? |
|
старожил
Сейчас нет на сайте
| Ну, желательно увидеть Ваш забор. Но либо объединяем в один меш в программе типа 3dsMax, либо используем скрипт combinemesh. Либо, если у Вас много материалов - гораздо важнее объединения мешей уменьшить количество материалов.
|
|
|
| |
| seaman | Дата: Четверг, 07 Марта 2013, 08:46 | Сообщение # 797 | Тема: Как изменять позицию курсора в Unity3D? |
|
старожил
Сейчас нет на сайте
| Тогда нужно так. 1. Скрываем стандартный курсор. Screen.showCursor = false; 2. Создаем свой курсор - GameObject + Plane + Texture с нужным видом курсора 3. Двигаем его как нам заблагорассудится.
|
|
|
| |
| seaman | Дата: Четверг, 07 Марта 2013, 00:01 | Сообщение # 798 | Тема: Как изменять позицию курсора в Unity3D? |
|
старожил
Сейчас нет на сайте
| MouseCursor - это класс редактора а не игры.
Стандартный курсор двигается сам от мышки. Вам нужно двигать его не зависимо от мышки?
|
|
|
| |
| seaman | Дата: Четверг, 28 Февраля 2013, 23:06 | Сообщение # 799 | Тема: Помощь в решении ошыбки |
|
старожил
Сейчас нет на сайте
| Make sure you have the Android SDK drivers installed, the phone USB drivers installed, and your phone has USB debugging enabled. Additional to that, make sure there is no Device Software active. If you have an HTC Phone and HTC Sync installed, you must first quit HTC sync. Some PC software for smartphones comes with their own adb.exe versions and this can be a cause Unity can't find the device
|
|
|
| |
| seaman | Дата: Четверг, 28 Февраля 2013, 21:35 | Сообщение # 800 | Тема: Помощь в решении ошыбки |
|
старожил
Сейчас нет на сайте
| А перевести?
|
|
|
| |