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

  • Last visited

  • Days Won

    106

OcularCash last won the day on November 19

OcularCash had the most liked content!

Community Reputation

942 Excellent

About OcularCash

  • Rank
    Team Member
  • Birthday 04/29/1985

Profile Information

  • Gender
    Not Telling
  • Location:
    Springfield Missouri USA
  • Interests
    Javascript, Java, C#, C++, PHP, 3d Modeling, Foley Recording, Photography

Contact Methods

  1. Problems with mixamo animations

    Good find. I didn't even know that myself
  2. Problems with mixamo animations

    Open the animation window and click on the character that has the animation attached (I believe it must be in the scene). Then in the animation window, select the animation you want to edit. Then click on the root bone (probably the hip) and make sure it's the right one that's moving. Then just simply delete all the movements (not rotations) and your done
  3. Getting variables from base class? c++

    Close. https://stackoverflow.com/questions/27767272/multiple-protected-inheritance-with-polymorphism
  4. Placing an object relative to contact points on Terrain

    Your best bet is to use physics collision (wheel colliders) instead of programming that from scratch. Not to detour you away from doing it, but the reason is because in order to do that yourself and get the plane leveled correctly, you will need to create your own physics methods and trig calculations, which is equal to slapping wheel colliders on and calling it a day
  5. How to tell when 24 hours passes by?

    When (System.DateTime.now - lastSampleTime).hours >= 1. So you plan a tree and it grows in 24 hours, lastSampleTime = timePlanted
  6. Add force to Rigidbody on a local axis?

    When moving, instead of moving in Vector3.forward, you want to move in transform.forward. transform.forward is transforms forward direction in world space (transforms local forward to world)
  7. Rigidbody AddForce to make ParentObject rotate

    Another note aswell. If you end up later down the road and forces don't fit your need and you have a wing flap "thing". You also say: plane.rotation.x = -wingFlapThing.rotation.x; which will cut out the physics calculations thus letting your game run a little bit faster. Best of luck
  8. Rigidbody AddForce to make ParentObject rotate

    Nice. I was thinking of hinges too but I've only used them for like signs and stuff so I didn't want to give false information. Good to hear you got it working tho
  9. Rigidbody AddForce to make ParentObject rotate

    Just don't have a rigidbody on the wings in the first placeand just have a script on it that tell the parent to add torque (not force). FYI, Torque is for for rotating, force is for moving. Question tho, why isn't it all one mesh?
  10. Scripts get big, reguardless of prefabs. In an average game, a player mechanics alone are thousands of lines of code, even when it's fully optimized and using code reduction techniques. It's just something you've got to live with. Just keep all assets nicely organized and that's all you can do. as for your game tho, I couldn't imagine it being more than 100 lines for the entire game tbh.as far as I can tell you just hit the ball into the whole, level complete. Rigidbodies controls the entire physics aspect which is 99% of the game so I'm not sure what exactly the amount of code your saying is coming from. you still have a lot to learn, but you've done good so far from what I can tell. The average person quits game development before creating there first game because they go for "AAA" MMO shooter full story "Game of the millineum" games and realize that games don't make themselves. But you've already understood and continued to push on to create something in your level so ya, I'd say your doing pretty good. (All this is assuming "all" the work was done by you that is... from head to toe. Good work
  11. Poser (Animation Sampling)

    This is an editmode poser a just threw together a few minutes for my project. What it does it you assign the animation component for the rig that you will be posing and assign one of the animations you'll be sampling from. Once you have those assigned, just tell it at what point in the clip you want it to sample at and click the "pose" toggle and presto, your rig is now posed. I'm using the boolean like a button so I didn't have to create a custom editor as well. This is very useful for things like default posing arms to certain weapon types so there won't be as much work to do or if you want to model to be posed but you don't want it to be using an animation, just pose it using an animation and you can delete the whole animation component if you want. But like I said, it's super simple but effective. If you want undo and redo or whatever, you'll have to add that yourself because I don't need it: @script ExecuteInEditMode() public var animationComponent : Animation; public var clip : AnimationClip; public var poseTime : float; public var pose : boolean; function Update() { if(pose) { Pose(); pose = false; } } function Pose() { var temp : AnimationClip = animationComponent.clip; animationComponent.clip = clip; animationComponent[clip.name].time = poseTime; animationComponent.Play(); animationComponent.Sample(); animationComponent.Stop(); animationComponent.clip = temp; }
  12. Need Help: Realistic Destruction System

    I'm lost with the whole tracking number concept. Wouldn't be easier to say something like: if(hit.attachedRigidbody) { hit.attachedRigidbody.isKinematic = false; } i think your just over thinking the concept
  13. ^ just adding in to make sure you cast it to a float, if not, 9/10 = 0 (or 1). So do (float)customValue / 10.0
  14. This is a super simple slot machine that yes.... is being implemented into my game along with the slot machine model and animation for it. Probably so much easier ways of doing it but I just threw it together to get working. You could probably make it so you can win guns in a shooter game or whatever. I have it in my game where you hit it the machine and it broadcasts the message to spin but you can do it however. Animation goes on the lever and uses an animation component. Assign the reels and the animation component and your good: public var reels : Transform[]; //public var audioSource1 : AudioSource; //public var audioSource2 : AudioSource; //public var spinAudio : AudioClip; //public var hitAudio : AudioClip; public var leverAnimator : Animation; private var spinning : boolean; private var winningTotal : int; private var state : int; private var dividend : float; private var finalFaces : int[] = new int[3]; private var speed : float; function Awake() { dividend = 360.0 / 6.0; } function Update() { if(spinning) { speed = Mathf.MoveTowards(speed, 1000, 500 * Time.deltaTime); for(var i = 0; i < 3; i++) { if(i < state) continue; reels[i].Rotate(-transform.right, speed * Time.deltaTime); } } } private var l : float; function ApplyDamage(player : Player) { if(spinning) return; leverAnimator.Play(); //audioSource1.PlayOneShot(spinAudio); spinning = true; state = 0; var first : int; var second : int; yield WaitForSeconds(1 + Random.value); state = 1; //audioSource2.PlayOneShot(hitAudio); for(l = 1; l < 7; l++) { if(reels[0].localEulerAngles.x < dividend * l) { reels[0].localEulerAngles = Vector3(dividend * (l - 1), 0, 0); first = l; break; } } yield WaitForSeconds(0.25 + Random.value); state = 2; //audioSource2.PlayOneShot(hitAudio); for(l = 1; l < 7; l++) { if(reels[1].localEulerAngles.x < dividend * l) { reels[1].localEulerAngles = Vector3(dividend * (l - 1), 0, 0); second = l; break; } } yield WaitForSeconds(0.25 + Random.value); state = 3; //audioSource2.PlayOneShot(hitAudio); for(l = 1; l < 7; l++) { if(reels[2].localEulerAngles.x < dividend * l) { reels[2].localEulerAngles = Vector3(dividend * (l - 1), 0, 0); if(first == second && second == l) winningTotal = l * 10; else winningTotal = 0; break; } } //audioSource1.Stop(); if(winningTotal > 0) print("You Won " + winningTotal.ToString() + "!"); speed = 0; spinning = false; } Models.zip Animation.zip
  15. Low Poly Cop Car (Toon Themed)

    Here is a low poly toon like cop car I did earlier today. Pretty self explained. 875 Tris: CopCar.zip
×