Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

geckoo

Moderators
  • Content Count

    2,802
  • Joined

  • Last visited

  • Days Won

    152

Everything posted by geckoo

  1. This code seems to me logical... I would do like this : Try a simple Debug.Log (WaveNumber); to see incrementation of this value for each enemies wave. If you don't see this incrementation, problem finds his cause ++
  2. geckoo

    Shame board

    I understand your disappointment, but I have some difficult to understand this method. Where is relation between programming process and a section to shame somebody ? I think mature persons can react with respect ++ (проще "до свидания")
  3. See your instantiate player in inspector for each clone and check individual camera. What do you use to create server/client side ? Photon or other asset ? I think your problem is inside prefab which you instantiate each player in scene ++
  4. Hi our serbian friend. Nice to meet you. Do you create somethink interesting with FPSkit ?
  5. geckoo

    Shame board

    What is a annoying member ? Sorry but I think it's really infamous. You will behave like a perfect troll. Where is utility of this comportment ? If you don't agree somebody, you can avoid him... Sorry (I respect you) but it's not a good idea ++
  6. Hi friends. I need a explanation to create a transparent backgroung on a scene. I use a simply colored plan as background in a project, but I search a method to add a second animated texture/plan between camera and first background to create a tiny slide with some basics shapes 2d. We can compare this effect with lens flare effect - I think, but I am not sure. Do you know how I can create this ? Thanks for your help ++
  7. geckoo

    Cell

    Thank you for your help and for this global positive feedback. For the music I use free site nosoapradio. I like style of these compositions (retro game). I must change cursor. I thought that it were a good idea, but it's too original... I will try different features. Who finished this first game? See you later ++ PS : NightBird0 - try 100 3.0/3.3
  8. geckoo

    Cell

    Hi friends. I have created a tiny game - in fact a prototype and now I need a first feedback. I think it's pleasant to play with physics in Unity. This game has been developed to simulate gravity and force field. Please can you try it and tell me what you think about this concept. I have created only 10 levels and I continue. All your words/critics will be considered seriously. Thank you ++ http://jeparlerusse.fr/games/Cell/Cell.html
  9. geckoo

    Resolution problem

    theMars2011 - why we must use this ration 12.8 - it's a constant and it works fine with each screen ?
  10. geckoo

    Resolution problem

    Thank you very much for your help theMars2011. I understand your method and I will try soon ++
  11. geckoo

    Resolution problem

    Hi friends. I have a tiny problem with my project. I have finished him, but when I export him on my server, I see another resolution. My project works with 1024:576 and on my desktop all runs perfectly, but after export resolution changes. I try modify HTML code in start page, but all is correct - 1024:576. This problem is really annoying, because I use in this project many GUItext and they don't resize himself when resolution changes. I must keep 1024:576. Do you know what happened ? Thank for your help ++
  12. It's not a problem. Value which you choose will be a constant - 75 in your example. But in your code I don't see anything about movement. Do you have created a controller? Try to redefine in inspector (game object cube) the constraints which are mentioned with rigidbody (freeze position y). I think it's the better way without code. Try it : https://docs.unity3d.com/Documentation/ScriptReference/RigidbodyConstraints.html
  13. Friend you can freeze vector in inspector panel - x, y or z. or you can vector.y define by a constant : transform.position.y Null
  14. http://www.indiegala.com Through web site IndieGala we can buy Interstallar Marine for 1$ minimum with other games. This game has been developed by a team which used Unity3d. I can't say that is a good game, but it seems to me (just for the fun) it is a good opportunity. Enjoy it! Можно купить видеоигру InterStallar Marines почти бесплатно, то есть 1$ или 0.9 евро. На самом деле я могу сказать вам, что это хорошая видеоигра, но мне кажется, что от подобного удобного случая нельзя отказаться. Я купил его. Попробую очень скоро. Я забыл вам объяснить, что использовали Unity3d, чтоб создать эту видеоигру ++ Une belle promo pour Interstallar Marines sur le site IndieGala - le jeu est à 1$ seulement, soit 0.90 euro avec deux autres bricoles. Ce n'est probablement pas une perle dans le genre, mais à ce prix-là je doute que l'on puisse regretter la dépense. La team à l'origine du projet utilise Unity3d. Avis aux amateurs ++
  15. geckoo

    Angle in GUIText

    public static GUIText oAngle; //angle oAngle.text = (transform.rotation.eulerAngles.y).ToString("F1"); I have coded a simple command to write in a GUIText an angular value which defines a force on a game object. This line works fine, but I want redefine point 0. Actually 90° figure an horizontal line. I want change my code to redefine him to 0. How I can modify the start point which defines angular value? Thank you for your help ++ Now I have this model : 180 * 90 ******* 270 * 0 But I want by a modified code this : 90 * 0 ******* 180 * 270
  16. if (!crouched){ //smooth movement to crouch camHolder.transform.localPosition = Vector3.Lerp(camHolder.transform.localPosition, Vector3.up * 0.8f, Time.deltaTime * duration); }else{ camHolder.transform.localPosition = Vector3.Lerp(camHolder.transform.localPosition, Vector3.zero, Time.deltaTime * duration); } You can use a lerp function to smooth movement ++
  17. If I understand correctly, we can use it to create a fullmultiplayer game with FPSkit ?
  18. geckoo

    controller

    I am using this basic script controller. It works fine with a simply vector3. It control collision, but I know I can't exploit a fully controller like this. I don't have slide, smooth movements or others features. Do you have some ideas to improve him? It seems to me you have another method. Can you share with me your experience or ideas? Thank for your help boys ++ using UnityEngine; using System.Collections; public class TheFactoryCC : MonoBehaviour { public bool isGrounded = false; public float radius = 0.78f; public float height = 2.18f; public void Move(Vector3 moveVector){ //no move? no expensive spherecasts! if (moveVector.magnitude <0.1f) return; //let's go isGrounded = false; Ray coreRay = new Ray(transform.position, moveVector); RaycastHit coreHit = new RaycastHit(); int collisionLayer = 1<<0; if (Physics.SphereCast(coreRay, radius, out coreHit, moveVector.magnitude, collisionLayer)){ transform.position = coreHit.point + (coreHit.normal*radius*1.05f); //hit a solid }else{ transform.position += moveVector; //we continue distance //HERE i can do something better in my project, but I don't know what... } Ray groundRay = new Ray(transform.position,-transform.up); RaycastHit groundHit = new RaycastHit(); if (Physics.SphereCast(groundRay, radius, out groundHit, (height*.5f)-(radius), collisionLayer)){ isGrounded = true; Vector3 standPos = groundHit.point + (groundHit.normal*radius) + (transform.up * ((height*.5f)-(radius))); Ray standRay = new Ray(transform.position, standPos-transform.position); RaycastHit standHit = new RaycastHit(); float standLength = Vector3.Distance(standPos, transform.position); if (Physics.SphereCast(standRay, radius, out standHit, standLength, collisionLayer)){ standPos = standHit.point + (standHit.normal * radius*1.05f); } transform.position = standPos; } } } I call it in another script : //control keys - alt/left shift to alternate with azerty/querty mod if (Input.GetKey("w")) inputVector += animObj.transform.forward; if (Input.GetKey("s")) inputVector -= animObj.transform.forward; if (Input.GetKey("d")) inputVector += animObj.transform.right; if (Input.GetKey("a")) inputVector -= animObj.transform.right; inputVector.Normalize(); //speed when you move if (!crouched){ fcc.Move(ReorientMove(inputVector) * Time.deltaTime * 10.0f); //speed }else{ fcc.Move(ReorientMove(inputVector) * Time.deltaTime * 5.0f); //speed }
  19. Thank for sharing, but it's not really for newbies. I saw these codes and the coder which uses it must necessary know more than a simple knowledge. It's not really hard, but it's not for noobs - it seems to me. Racing car is very cool. Thank ++
  20. It's a really good scene. Visual in water is amazing. I like details in this scene like fishes and rocks. I think you must reconsider physics in water. Not realistic. Thank for sharing ++
  21. geckoo

    a strange bug

    Do you think it's just a question of performance? Ok I understand. I will try soon. Thank for your help. Perhaps you have found what is wrong in this code ++
  22. geckoo

    a strange bug

    Hi folks! Again I need your help to solve a strange problem with which I have lost many time trying different methods without good result. I try to expose you this bug. When a player dies, code waits 5 seconds and after it, player respawns. It works fine, but server (the player who hosts game) see this "last" player during a split second - a fragment, just before his respawn - same position, same weapon. I think there is a delay between information on the server and this function to others. Maybe it create this bug. Please see parts of my code and say me if you find some trouble. Thank you for your help ++ This function follows the player during game and helps me to erase "dead" body which is replaced by a RagDoll sequence. void LateUpdate(){ if (thisPlayer.health<=0f){ //for each player dead cc.enabled = false; //avoid collision with ragdoll (cc - controller) transform.Find("SoldierX/armorArms").renderer.enabled = false; transform.Find("SoldierX/armorBody").renderer.enabled = false; transform.Find("SoldierX/head").renderer.enabled = false; transform.Find("SoldierX/Bip01/Bip01 Pelvis/Bip01 Spine/Bip01 Spine1/Bip01 Spine2/Bip01 Neck/Bip01 Head/soldierHelmet").renderer.enabled = false; gunMesh1.renderer.enabled = false; gunMesh2.renderer.enabled = false; }else{ //for each player alive //we play with this bone to articulate our player by x axis transform.Find("SoldierX/Bip01/Bip01 Pelvis/Bip01 Spine/Bip01 Spine1").localEulerAngles += new Vector3(0, 0, -camAngle.x); /////////////////////////////////////////////////////////// transform.Find("SoldierX/armorArms").renderer.enabled = true; transform.Find("SoldierX/armorBody").renderer.enabled = true; transform.Find("SoldierX/head").renderer.enabled = true; transform.Find("SoldierX/Bip01/Bip01 Pelvis/Bip01 Spine/Bip01 Spine1/Bip01 Spine2/Bip01 Neck/Bip01 Head/soldierHelmet").renderer.enabled = true; gunMesh1.renderer.enabled = true; gunMesh2.renderer.enabled = true; cc.enabled = true; } } My RPC function to respawn [RPC] void RespawnPlayer(NetworkViewID viewID){ lastRPCtime = Time.time; if (viewID == localPlayer.viewID){ for (int i=0; i<players.Count; i++){ if (players[i].viewID == viewID){ // different game settings if ((gameSettings.playerLives > 0 && players[i].lives>0) || gameSettings.playerLives ==0){ //respawn players[i].fpsEntity.Respawn(); } } } } } This function does the respawn and send info to each player //respawn dead players if (isServer){ for (int i=0; i<players.Count; i++){ if (players[i].health<=0f){ if (Time.time > players[i].respawnTime){ if (gameSettings.playerLives==0 || players[i].lives>0){ players[i].health = 100f; // he's alive! } // I think HERE player is alive (for the server) but only a split second after he respaws for others networkView.RPC("AssignPlayerStats", RPCMode.All, players[i].viewID, players[i].health, players[i].kills, players[i].deaths, players[i].currentScore); networkView.RPC("RespawnPlayer", RPCMode.All, players[i].viewID); } }else{ players[i].respawnTime = Time.time + gameSettings.respawnWait; } } }
  23. geckoo

    Texture Pack 5

    Link don't work ? page 404
×
×
  • Create New...