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.


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by geckoo

  1. geckoo

    Resolution problem

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

    Resolution problem

    Thank you very much for your help theMars2011. I understand your method and I will try soon ++
  3. 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 ++
  4. 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
  5. 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
  6. 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 ++
  7. 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
  8. 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 ++
  9. If I understand correctly, we can use it to create a fullmultiplayer game with FPSkit ?
  10. geckoo


    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 }
  11. 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 ++
  12. 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 ++
  13. 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 ++
  14. 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; } } }
  15. geckoo

    Texture Pack 5

    Link don't work ? page 404
  16. geckoo

    Seus Lens Flare

    Thank for sharing. Effect is really cool ++
  17. I have a project which I would share with you... in other case. I don't like your avatar. Good luck mein herr ++
  18. I saw a clone of GTA. Result don't really good, but with some money, time and a team, it's possible ++
  19. very cool mix, but sound not really good. Quality problem ++
  20. I know better web sites. Besides it's too expensive ++ for musics - http://www.nosoapradio.us for sounds - http://soundbible.com/blog/2013/100-war-sound-fx Google is our friend
  21. It's look good but... I have compared this code with mine and it seems to me very bugged. It's not a reproach because devlopper is very nice with us. He shares his code kindly. I have many clipping, network don't work fine and I have an annoying lag each time I shoot. What he used to create net relation between players? Photon or something like it?
  22. It's like CS. Weapons and body interest me ++
  23. Sure we can modify speed of our enemy. I can understand this fact - you don't know where are these values because you are a beginner, but with time and strong will it's possible to read code like a book. You must start with simple codes/sources. In the web it's very easy to find tutorials. After it, learn FPSkit and this code will seem to you really amazing ++
  24. geckoo


    Finally I use the easiest method It works fine. Thank you friends ++ private bool crouched = false; private float duration = 7.0f; (...) if (!crouched){ camHolder.transform.localPosition = Vector3.Lerp(camHolder.transform.localPosition, Vector3.up * 0.8f, Time.deltaTime * duration); // Vector3.zero; }else{ camHolder.transform.localPosition = Vector3.Lerp(camHolder.transform.localPosition, Vector3.zero, Time.deltaTime * duration); // Vector3.zero; }
  • Create New...