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,816
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by geckoo

  1. geckoo

    teleport a rigidbody

    if I disable this rigidbody I can't hold him This is the paradox of my problem - it's easy, but... really hard...
  2. geckoo

    teleport a rigidbody

    Ok I have been trying many things and now it works correctly, but I have another problem which seems to me just a logical ask. When player throws a GO with rigidbody inside a portal, we see the movement and a correct velocity. It's cool and FX is really fun. I will do a SandBox soon as possible. But when player holds this same GO which touches the teleport zone (but player didn't touch this portal), the first GO changes his location and returns to the player which is near to the teleport zone, the GO touches again the teleport zone and changes his location, always and always - as a loop. I think I must disable something, but I don't know what. Do you have some idea about this problem? Thank you very much for your help ++
  3. It seems to me that you have a missing script on your prefab. See your prefab. This is not a problem with your script, but with your prefab. Maybe I am wrong ++
  4. geckoo

    teleport a rigidbody

    I have been trying all - rigidbody.velocity, rigidbody.isKinematic, rigidbody.sleep... and it didn't work. How it's possible ? All works fine with my player - why we have a problem with another rigidbody ?
  5. Hi folks! In another project I use 2 camera to create a portal like in the valve's game. In this case, all works fine with Unity free version. I have associated a teleport script by OnTriggerEnter - it seems to me interesting and effect is cool for the player... and only for the player, because I can't efficiently teleport another rigidbody. It touches the teleport zone and velocity become crazy. Do you know a script to teleport a rigidbody and keep an right velocity? Thank you very much ++ function OnTriggerEnter(other : Collider) { other.gameObject.transform.position = exit.transform.position; }
  6. I'm tired - the last one was really bad ++
  7. Thank you for sharing this weapons ++
  8. Hum... I have a little problem with some comments. I don't know if you have decided to be cynical with me - maybe it's just a joke. In fact, it seems to me that it's more important to help somebody using examples than to write for him a full script. I have explained him some method, but he must work himself - I think. I don't know if he understands these simple functions. I show him the way. Now if you know the solution - please, give us, my friend ++
  9. WaitForSeconds didn't work in CS like in JS. You must create a coroutine. It's not really hard. I include always this function in my project ++ float procDuration = 2.0f IEnumerator Wait(float duration){ yield return new WaitForSeconds(duration); // do my code.... } StartCoroutine(Wait(procDuration));
  10. ray = transform.camera.ScreenPointToRay (Vector3(Screen.width/2.0,Screen.height/2.0,0)); if(Physics.Raycast(ray, hit, 100))hit.collider.gameObject.material.SetColor("_Color", Color.red); Now you got a base to create your function. Do a condition on GO when you click button mouse. In the same way - you can change size and alpha GO to create a shell around your GO, using Instantiate function ++
  11. In first, you must store all about your GO where your mouse focuses. It seems to me that you use a rayCast function in order to define a zone. After it, you can destroy the previous GO and create the same with Instantiante function. I think it's the best way, but in theory ++ http://docs.unity3d.com/Documentation/ScriptReference/Object.Instantiate.html
  12. I don't know if a petition will be helpful for someone in USA, but where I live it's not very useful. Who can change something with paper? Homewer I subscribe and sign ++
  13. geckoo

    LD29

    A tiny contribution for the LD29. It's my first and this concept (not really a full game) has been developed during this week-end. The theme was "beneath the surface" - not really easy. I have used some interesting shaders and my previous script to spawn the "tiny zombies cubes". I wait some feedbacks now... I like LD - it's a good way to find many sources and interesting projects which sometimes are surprising. Did you know this crew? Bye friends ++ http://www.ludumdare.com/compo/ludum-dare-29/?action=preview&uid=35835
  14. Today I have used NavMesh for a project which is destined to LD29 and I was really glad to discover this tool in Unity. I know OMA uses another PathFinder which seems to me really efficient, but I want understand why you like this A* and no this tool which is included in Unity. Where is the utility ? Thank for the tips ++
  15. Really good and without similarity with other turrets.. Well done ++
  16. geckoo

    Spawn wave control

    Thank you for your support. In fact I like my code, but I don't want to work as a butcher using command lines which ruin efficiency of script. In my code many options don't be available because I have searched the easiest way. I will be happy to consider your point of view, but don't search the perfection ++
  17. geckoo

    OnMouseDown

    Maybe you want in fact to do another thing : http://docs.unity3d.com/Documentation/ScriptReference/Event-button.html
  18. geckoo

    Spawn wave control

    I said "it's the easiest way to(...)" and I didn't search optimization - just an easy way. I agree with you - this GameObject.Find is a sin For this type of game which uses a simple concept I play with 20 enemies in a big arena (similar to FPSKit) and I keep 150/200 fps. Optimization will be great... but not necessary to play. Another sin PS : I will be very happy notice an optimised code - a good lesson for me. Thx ++ ____________________________ In fact I have tried to change go.Find by another function, but I couldn't. I will be grateful if you can explain to me an alternative. Thx ++
  19. Cool game with nice graphics. Thanks ++
  20. A simple way to create a spawn wave script like in FPSkit. Sure ! this is not a revolution, but it seems to me that this script may be helpful for who wants to create a simple FPS with a simple concept. Define in inspector the number of spawnPoints like you want, define too your enemy and fight Next wave come after the full destruction of previous enemies. Next wave will be increased by 2 - max 20 ennemies... I have coded this script using the easiest method. Maybe you can ameliorate it ++ // simple way to create a spawn wave script /////////////////////////////////////////// using UnityEngine; using System.Collections; public class SpiderWave : MonoBehaviour{ public GameObject _monster; public Transform[] _spawnPoints; // know your ennemy private string _monsterName; // 2 seconds between each spawn private float delayTime = 2f; private int _oO = 0; // we start easy with 2 enemies private int _nbrMonster = 2; IEnumerator Start(){ int i = 0; //restart // loop to create a wave using _nbrMonster for (i = 0; i < _nbrMonster; i++){ Transform pos = _spawnPoints[_oO]; Instantiate(_monster, pos.position, pos.rotation); // I know his name _monsterName = _monster.name; // change spawnPoint _oO ++; if(_oO >= _spawnPoints.Length)_oO = 0; // wait a moment yield return new WaitForSeconds(delayTime); } } void Update(){ // while the last enemy lives always we wait if(!GameObject.Find(_monsterName+("(Clone)"))){ _nbrMonster = _nbrMonster + 2; // increase +2 if(_nbrMonster > 20)_nbrMonster = 20; // maximum occurence StartCoroutine(Start()); // new wave } } }
  21. geckoo

    fuel tanks

    Do you really want debate about this? Another question - why I can't gnaw my nails while I see my hands? OK I am gone
  22. geckoo

    Blur when aiming!?

    Attach this FX on the camera, disable it and write a simple code in your AIM function to enable this FX. When AIM is off - by the same way disable FX ++
  23. You can store your previous state as a quaternion and make it return to original by the same way - in theory I think you must learn many things about Quaternion.Euler - here will be the key. Can you post your whole code. Like this we can help you modify him... PS : In this example which I found on unity forum, they have used a rigidbody to define a velocity. When this velocity == 0 code redefines a new Quaternion - the previous storage. It's more hard, but it works. Maybe you can exploit this example in your project ++ http://answers.unity3d.com/questions/453656/quaternionslerp-problem.html
  24. Did you read the unity tutorial about transform.rotate ? http://docs.unity3d.com/Documentation/ScriptReference/Transform.Rotate.html I don't know exactly what you want but maybe this is it: void UpdateMovingParts(){ Quaternion newRotation = new Quaternion(transform.rotation.x, transform.rotation.y, transform.rotation.z, transform.rotation.w); newRotation *= Quaternion.Euler(90, 0, 0); // this add a 90 degrees X rotation transform.rotation= Quaternion.Slerp(transform.rotation, newRotation,20 * Time.deltaTime); }
  25. Make web site ? I don't have time to administrate my own forum... how and why I could create another site ? Themes on Weebly are really cool but it seems to me that those services are too expensive. With WordPress and a good provider we can do better than weebly... I think you must create your own web service ++
×
×
  • Create New...