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.

wonker21

Premium Member
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

2 Neutral

2 Followers

About wonker21

  • Rank
    Premium
  • Birthday 12/05/1996

Profile Information

  • Gender
    Male
  • Location:
    Lithuania
  • Interests
    C#, C++, C, OpenGL, Unity3D, Blender, Photoshop
  1. Maybe your bullet has gravity checked?
  2. Haven't tested. Maybe this helps using UnityEngine; public class camraycast : MonoBehaviour { Camera mycamera; public Transform target; GameObject prefab; public int bulletSpeed = 10; public GameObject angle; // camera void Start() { prefab = Resources.Load("bullets") as GameObject; } void Update() { if (Input.GetMouseButtonDown(0)) { Vector3 camScreen = new Vector3(0.5f, 0.5f, 0f); // center of the screen float rayLength = 500f; RaycastHit hit; Ray ray = mycamera.ViewportPointToRay(camScreen); Debug.DrawRay(ray.origin, ray.direction * rayLength, Color.red); if (Physics.Raycast(ray, out hit, rayLength)) { print ("Looking at : " + hit.transform.name); GameObject bullets = Instantiate(prefab) as GameObject; bullets.transform.position = transform.position + angle.transform.forward * 0.1f; Rigidbody rb = bullets.GetComponent<Rigidbody>(); rb.AddForce((hit.point - angle.transform.position) * bulletSpeed); Destroy(bullets, 9f); } } } }
  3. wonker21

  4. But the camera is a child of player. Isn't it? It would still follow the player. Sorry I don't quite know whats your setup.
  5. I dont know if it's tilt but maybe this could help. And then you could just Lerp Angle variable based on input and such
  6. How is it even 10 Gigs??
  7. Really cool little game. Can be very challenging. Love the visuals
  8. Thanks, just what I was looking for.
  9. Youre rotating the sprite itself. You would want to use billboard shader.
  10. If the task is in C++ then here you go: https://gist.github.com/wonker21/e482f87a87c72f474322
  11. What is the file format you are trying to stream? Because for example mp3 streaming is only supported on mobile platforms and not web or standalone. Edit: You may try to convert mp3 to ogg or other formats With Ogg it works just fine. using UnityEngine; using System.Collections; [RequireComponent(typeof(AudioSource))] public class PlayMusic : MonoBehaviour { public string path; private AudioSource source; IEnumerator Start() { source = GetComponent<AudioSource>(); WWW www = new WWW("file://" + path); yield return www; source.clip = www.GetAudioClip(false, true, AudioType.OGGVORBIS);//AudioType.MPEG); source.Play(); } }
  12. Do you plan on using AssetBundles for this to make it expandable after build? If so, I'm picking this up mate
  13. Maybe you need to yield the www to make sure it is actually ready. Could you show us some more logic?
  14. Also you can change icons of ScriptableObjects. How to here