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.

OcularCash

ADG
  • Content Count

    3,861
  • Joined

  • Last visited

  • Days Won

    131

Everything posted by OcularCash

  1. OcularCash

    Sort first objects nearest me ?

    Good to see you got it going. Friendly advice tho, change enemiesInRange from a list of gameObjects to a list of enemyPath. All those get components eat up a lot of rss bc your using it an update loop. So just cache the component on trigger enter and you don’t have to get it up to 3x, 60 times a second. edit: and whenever you need to transform or go, you would just call enemiesInRange[index].transform (or gameObject) since the component caches the transform/gameObject that it’s attached to
  2. OcularCash

    Blender to Unity missing Edge?

    Grab that vert in blender or whatever you use and move it forward/backward and see if it’s a combined vert in your modeling app. If it’s is, looks unity is splitting the vert and putting it in the wrong place. If it’s 2 different vertices, combine the 2 and it should fix it p.s. On the other one, it looks like a simple light leak caused split edges (2 edges that doesn’t share vertices)
  3. OcularCash

    Weird issue with model/texture.

    Just looks like to me that the uv is overlapping the texture in blender, click on the those triangles and make sure it’s mapped correctly on the texture
  4. OcularCash

    Why is Photon player being instantiated twice?

    I have no idea. I’ve never used either so not sure when they’re called. But that “is” something that could double the calls. Wait, what’s up with the addcallbacktarget being called in both enable and disable?
  5. OcularCash

    Why is Photon player being instantiated twice?

    Check in the scene and see if there is 2 objects in the scene with this script attached in play mode ( not in edit mode). Your code looks ok so I’m guessing with dontdestroyonload, somehow or someway 2 of the same scene objects are ending up in the same scene
  6. OcularCash

    Why is Photon player being instantiated twice?

    In rpcloadedgamescene is the info being logged twice in the console?
  7. OcularCash

    Is it possible that this code would break sometimes?

    Not sure, I don’t use singletons very often. I know @YoungDeveloper is a singleton fan tho so he might know
  8. OcularCash

    Is it possible that this code would break sometimes?

    It could continue to work, it could not. Idk how unity calls for instancing but my guess is it’s sorted maybe (by name or size or something), where your input manager is created and stored closer to the end of the list to update than your test script. I’m saying it’ll most likely always work as long as input manager is stored after the other script. but like I said, idk how it’s ordered and called p.s. When I write my engines, when a scene instances, it starts it like this (create game object>transform add components in order and called awake as each component is being created). For instance: for(i < scene.objects) { go = new instance(scene.objects.go); for(c < scene.objects.components) { Comp = go.addcomponent(...[c]); } public class component : behaviour { public component() { Awake(); } } so it depends on where it’s store in the scene/project file. One can use awake to access something like that as long as it’s created after
  9. OcularCash

    Bullet Tracer Problem

    Your not setting the rotation of the tracer. Thus the tracer is always facing in vector3.forward instead of in the same direction as the camera
  10. OcularCash

    Script help me

    conversion: add your namespace just like you see in other c# scripts change function to void change var dead : Rigidbody = to Rigidbody dead =, same goes with other variables remove the period after GetComponent so it’s GetComponent<Something> instead of GetComponent.<Something>
  11. OcularCash

    Script help me

    Js and c# cannot interact without forcing one to compile first. Your best bet is to just convert the js file to c#
  12. OcularCash

    Script help me

    Your answer is in your console. PlayerDamage does not exist in your implementation. Change ApplyDamage to PlayerDamage. conversion: add your namespace just like you see in other c# scripts change function to void change var dead : Rigidbody = to Rigidbody dead =, same goes with other variables remove the period after GetComponent so it’s GetComponent<Something> instead of GetComponent.<Something> thats the basics of converting js to c# in a nutshell. Don’t really need a converter for such a small script
  13. OcularCash

    error CS0246

    Do you have two scripts with the namespace “Look”? If I remember correctly they cancel each other out and throw that same error. Happened a couple times to me when I first started using unity and created a mouselook but also had the standard unity mouselook in the project
  14. OcularCash

    Quaternion Glitch

    As Roland stated. It’s unitys quaternion version of the gimbal lock
  15. OcularCash

    How you start GameDevelopment/coding?

    Lol most of the staff including oma is around my age
  16. OcularCash

    How you start GameDevelopment/coding?

    I started by making text adventure games on ms dos. Concept was pretty simple. List of questions (to the north there is a tree. To the east you see a man pushing a wheel barrel. To west you hear the sounds of the ocean) each direction led to another index in the list, etc. so I actually learned to code prior to editors or any kind of visuals/visual aids whatsoever, just words on a black screen. in the mid/late 90s I spent a lot of time modding gta (the original on Windows back before it released on the first PlayStation). Used to make penis cars or erase the cars so they’re just floating around lol (don’t judge, I was 12). That’s when I got more into visual game developing and started working on games like link to the past, super Mario and ff mystic quest like games so what... 20 something years and still love developing
  17. OcularCash

    Help Move script Please

    You just had this exact same issue on Saturday. Always recheck your work for spelling mistakes just think of it like this. Your not wanting to create a function that fixes the update, your wanting to use a function that has already been fixed. Hint Fix(ed) update and not fix. Because if it was called FixUpdate, then that would mean the update loop has not been fixed yet which would make no sense putting anything in it. Coding is just a form of writing, if it makes no sense when you read it back, then you misstyped something
  18. OcularCash

    Object didn't spawn

    if(Moving == true), not if(Moving = true). FixedUpdate, not FixUpdate. You said you copied it perfectly but there’s those issues so obviously it’s not copied perfect. If it works in the video and not for you, it’s a mistake you made, not the author Make sure FixUpdate is changed to FixedUpdate on both scripts, not just one
  19. Use two lights and separate the objects into two separate layer. Render the low light level object using one light and everything else with the other
  20. OcularCash

    NavMesh custom walking behaviour

    Well you can still use nav mesh, just have to make your own agent then. Just get the path to the target, clamp the direction and use a rigid controller/char controller for physics stuff. If clamped direction compared to controller forward is at a greater angle than 5, rotate to target direction, else move forward
  21. OcularCash

    Saving changes on GameObject during play mode

    Nice. You can also do the same thing by right clicking the component you want to save and selecting “copy component”, then exiting play mode and right clicking again and selecting “paste component values”. But good none the less
  22. OcularCash

    Can someone help me fix orientation on a few models?

    Your most likely changing the pivot by accident sometimes and it's throwing everything off. By left clicking, your anchor changes and therefor throwing off the pivot. https://docs.blender.org/manual/en/dev/editors/3dview/object/editing/transform/control/pivot_point/index.html I always have mine set to "median point" which makes every scale, move and rotate from the middle of the selection vs from the anchor point. If you want to rotate everything around a point (like rotating around a parent in unity), you use 3d cursor instead and just place it where you want to rotate around at. heres a common shortcut cheat sheet: a = select all z = toggle wire frame g = move r = rotate s = scale b = box select when using g, r or s you can then press x, y or z and type in the value you want to rotate, scale or translate by. Just those 6 hot keys will get you around blender quite easily. Just remember, always manipulate in edit mode, NOT object mode. Object mode does not change any vertice locations, only changes the transforms values, which is exactly the same thing as just changing transform values in unity, which is not what you want.
  23. OcularCash

    Can someone help me fix orientation on a few models?

    Just open blender. Select your object, go into edit mode and press "a" to select all the vertices. Then press, for instance to rotate on 180 on the vertical axis, "r" then "z" (z is unitys y, y is unitys z) then "180" and hit enter. Change in edit mode, not object mode. Really simple. Just saying how to do it bc I'm currently short on time and can't do it myself
  24. OcularCash

    Add shield to animated model ?

    Cloth possibly? Unless you rig the body rig to the vest
  25. OcularCash

    Open Source Radial Progress Bar Shader

    Looks good. Not sure why this was created tho since ugui already has radial filling and is already optimized
×