Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

106 Neutral

About JoshuaFraser

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. JoshuaFraser

    Magick with a K

    Thanks for the constructive feedback, it's always interesting to see how different communities react to this kind of information.
  2. JoshuaFraser

    Magick with a K

    Haha get back under your bridge bro you follow like a bad smell
  3. JoshuaFraser

    Magick with a K

    Hi sorry if my post formatting skills are sub par. I thought I should chuck this up in the lounge for anyone interested, it's a paper written by Jake Blatchley. The paper discusses historical figures and explores a realm that's on the front lines of the current consciousness paradigm shift we are experiencing world wide. Below I have put a link to the paper, read it with an open mind and if you have something to say please feel free to discuss your thoughts in this thread. Star-t Doing Magick.docx
  4. JoshuaFraser

    Who's your intellectual idol?

    At the moment I've been watching a bunch of Jordan Peterson lectures, he's got a lot to say about keeping your head in order.
  5. Hi and thanks for reading, I have an issue with this reactive crosshair script, everything works fine until I start changing the offset. Give the script a go and you will see what I mean, when I do SetOffset(0f); it doesnt always set back to the origional state, if anyone can spot a fix I'd be super appreciative! using System.Collections; using System.Collections.Generic; using UnityEngine; public class ReactiveCrosshair : MonoBehaviour { [SerializeField] GameObject c_limb_prefab; private float center_offset = 0f; private float current_offset = 0f; private float max_offset = .5f; private int number_of_limbs = 4; private float limb_length = .05f; private float limb_width = .005f; private List<GameObject> c_limbs = new List<GameObject>(); public void SetupCrosshair(){ for (int i = 0; i < number_of_limbs; i++) { GameObject line_go = (GameObject)Instantiate (c_limb_prefab); line_go.transform.SetParent (this.transform); Vector3 limb_pos = new Vector3 (0f,0f,0f); //line_go.transform.position = limb_pos; line_go.transform.localPosition = limb_pos; LineRenderer line = line_go.GetComponent<LineRenderer>(); line.startWidth = limb_width; line.positionCount = 2; line.SetPosition (0, line_go.transform.localPosition + new Vector3(center_offset, 0f, 0f)); line.SetPosition (1, line_go.transform.localPosition + new Vector3(center_offset + limb_length, 0f, 0f)); line.useWorldSpace = false; c_limbs.Add(line_go.gameObject); } if (c_limbs != null) { OrientLimbs (); SetOffset (0f); } } public void OrientLimbs(){ for (int i = 0; i < c_limbs.Count; i++) { float rotation_step = 360f / (float)c_limbs.Count; c_limbs [i].transform.RotateAround (c_limbs[i].transform.position, c_limbs[i].transform.forward, 90f + (rotation_step * (float)i)); } } public void SetOffset(float _current_spread){ float offset = Mathf.Lerp (0f, max_offset, _current_spread); for (int i = 0; i < number_of_limbs; i++) { if (offset > current_offset) { Vector3 pos = c_limbs [i].transform.position + (c_limbs [i].transform.TransformDirection (Vector3.right) * offset); c_limbs [i].transform.position = pos; } if (offset < current_offset) { Vector3 pos = c_limbs [i].transform.position - (c_limbs [i].transform.TransformDirection (Vector3.right) * offset); c_limbs [i].transform.position = pos; } } Debug.Log ("SetOffset() offset: " + offset.ToString () + " _current_spread: " + _current_spread.ToString() + " localPos: " + c_limbs[1].transform.localPosition); current_offset = offset; } }
  6. JoshuaFraser

    Physics for a 2D game

    Use raycasts to check for collision, if you check out Sebastion League on youtube he covers a super solid way of handling a 2d platform controller that won't go through objects even at very high speeds.
  7. JoshuaFraser

    Programmer looking to join a team

    Do you have a portfolio?
  8. Collider and MeshRenderer are components but do not derive from Behaviour like other components do. For both of these components you will need to get the components and set .enabled outside of your foreach loop, Collider col = GetComponent<Collider>(); if(col != null) col.enabled = false; MeshRenderer mr = GetComponent<MeshRenderer>(); if(mr != null) mr.enabled = false; This is the correct way to do this
  9. JoshuaFraser

    Three Basic NPC AI's

    Three Basic NPC AI's by OneShot Tek - Joshua Fraser Written 23/04/2018 Project outline The purpose of this project is to create 3 basic non-player character (npc) ai's. Each ai must exhibit a distinct behaviour model toward other live entities. The ai's must have some level of awareness in terms of environment so they can navigate properly, be aware of other live entities and interact with them. All three ai's must behave in accordance with their designated nature. These behavior natures will be friendly, neutral and hostile. When complete this project will be a neat modular asset package for Unity. Behavior outlines Universal: ⦁ Idle - static/roam ⦁ Identify entity within sense range When an entity is identified act according to nature: Friendly: ⦁ Turn toward entity ⦁ Kindly verbally greet entity ⦁ Face entity until out of range or either party is dead ⦁ If attacked flee until out of sense range ⦁ If attacked verbally ask entity to stop Neutral: ⦁ Don't do anything unless physically touched ⦁ If attacked turn toward entity move within attack range and attack until entity either party is dead ⦁ If entity moves outside attack range get back within attack range and continue attack ⦁ If entity escapes sense range move back to original point of conflict Hostile: ⦁ Turn toward entity ⦁ Harshly verbally greet entity ⦁ Move within attack range and attack entity until either party is dead ⦁ If entity moves outside attack range then get back within range and continue attacking ⦁ If entity escapes sense range move back to original point of conflict AI Parameters constant ⦁ name ⦁ id ⦁ walk speed ⦁ run speed ⦁ max health ⦁ max stamina ⦁ attack value ⦁ kind greeting ⦁ hostile greeting ⦁ neutral greeting ⦁ sense range ⦁ attack range ⦁ spawn point dynamic ⦁ current health ⦁ current stamina ⦁ current state ⦁ current position ⦁ target entity position ⦁ target movement position ⦁ original point of conflict
  10. JoshuaFraser

    2d collision issues

    in different classes i have getters and setters and stuff, not to mention things pointing everywhere and I'm still super novice so I don't think I could present just the logic in question in such a way that it would imply what I'm doing with the rest of my code which I feel is probably pretty necessary for someone to understand the root of my problem, Sorry for being such a noob   Edit: My project is pretty small as far as projects go so it's not heaps of code
  11. JoshuaFraser

    2d collision issues

    It's split between a few files in my project, I think I need someone to take a second to look at the overall project because I don't want to miss something when I'm finding all the logic sections   Edit: if the link is broken please let me know
  12. JoshuaFraser

    2d collision issues

    I know how it works, like my code makes sense, idk why it won't work
  13. Hi guys, I'm having some issues doing 2d collision with small c++/sdl project.   I'll keep it short and simple, I'm using the bounding box method to detect collision. for some reason it is not working :/ I have been revising my code for days and I just can't find the root of the problem, this code is the result of a tutorial I followed, however I do understand most of what is going on.    My collision simply won't work, I'm positive I'm doing it the correct way, I'm not getting any errors either but I can't get my test output to trigger.   For anyone who feels like helping a noob out I will put a link to my code here.   If you do decide to help and let me know where I went wrong, thank you so much in advance  , trust me I have spent so much time and done so much research to find out why my collision detection doesn't work.   Ps: if you notice anything else wrong with my code please let me know also
  14. JoshuaFraser

    Three Basic NPC AI's

    Album for Three Basic NPC AI's
  15. JoshuaFraser

    Three Basic NPC AI's

    Album for Three Basic NPC AI's
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!