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.

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. Use raycast as a pointer ?

    Maybe your bullet has gravity checked?
  2. Use raycast as a pointer ?

    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. FPS Camera Tilt (Left And Right)

    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.
  4. FPS Camera Tilt (Left And Right)

    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
  5. Lumber Yard (Free Amazon Game Engine)

    How is it even 10 Gigs??
  6. Oöcyte

    Really cool little game. Can be very challenging. Love the visuals
  7. A* Pathfinding Example

    Thanks, just what I was looking for.
  8. 2D in a 3D world Script help

    Youre rotating the sprite itself. You would want to use billboard shader.
  9. Help with task on programming class

    If the task is in C++ then here you go: https://gist.github.com/wonker21/e482f87a87c72f474322
  10. Local Audio files not playing (no sound)

    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(); } }
  11. Player Customization kit.

    Do you plan on using AssetBundles for this to make it expandable after build? If so, I'm picking this up mate
  12. Local Audio files not playing (no sound)

    Maybe you need to yield the www to make sure it is actually ready. Could you show us some more logic?
  13. Changing icons for Scripts and GameObjects

    Also you can change icons of ScriptableObjects. How to here
×