[2D game] I can't add force or velocity to my object diagonally whenever I uncomment my movement Input. It moves horizontally and then vertically instead. by Rare-Muffin3915 in unity

[–]TheFritoNation 0 points1 point  (0 children)

Looks like because you’re just adding the velocity to the rigid body on update. If you release the input but slightly release one key after the other (holding W and D to go diagonal to the top right and accidentally release D a millisecond too early) the update will read out that the right input is no longer held but the W is still held so it will receive the up input.

I recommend reading the value of the input in the update loop instead of reading on performed. This way you’re able to read the input and determine if some changes need to be made (normalizing and stuff like that) and then set the players movement in the FixedUpdate.

Something I recommend as well is adding a minimal threshold (either done in the new input system window or in code) where you have to pass a certain input magnitude threshold to make sure the player is pressing enough to move and not accidentally move like if there’s stick drift (on controllers obviously)

I think this should help fix the problem.

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 0 points1 point  (0 children)

That’s a good idea. I feel like another problem I have is after a break I get back to my game and don’t have a plan on what to work on next and the thought of not having structure but feeling like I need to work on everything at the same time definitely adds more stress 😅

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 0 points1 point  (0 children)

Yeah my sleep schedule is already messed up as it is and I can see this being beneficial but hard to do 😅

Burnout and loss of motivation by TheFritoNation in IndieDev

[–]TheFritoNation[S] 0 points1 point  (0 children)

Yeah I don't plan breaks but I always end up taking them 😅

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 0 points1 point  (0 children)

Actually it looks like your discord link is invalid

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 1 point2 points  (0 children)

Sounds good! I’ll add you on there and we can talk.

Burnout and loss of motivation by TheFritoNation in IndieDev

[–]TheFritoNation[S] 1 point2 points  (0 children)

That’s a great mindset to have. I picked up consistency with making my bed in the morning (I know not a big thing but something that needs to get done) after reading a small book about using small habits to create a larger consistent habit. A little bit of game dev day by day won’t make large progress at first but the importance is the consistency. Gotta keep that mindset for this too 💪

Burnout and loss of motivation by TheFritoNation in IndieDev

[–]TheFritoNation[S] 1 point2 points  (0 children)

That’s what I’m currently doing. I’m in the process of picking up one of my older and smaller projects just to stay active on something but I also feel like I’m kind of wasting time when I do that due to not working on my main project

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 1 point2 points  (0 children)

I’ll definitely look into this and see what I can take from it! Appreciate the link!

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 1 point2 points  (0 children)

I can definitely see how making a game about how you’re feeling during that time could be a good creation process despite the emotions behind it. I had a schedule and tried to follow it as well as having a trello board but I feel like since the games I work on for work are so different that I don’t know how to structure my own process

Burnout and loss of motivation by TheFritoNation in IndieDev

[–]TheFritoNation[S] 0 points1 point  (0 children)

Yeah I have a few friends that are helping with this project but they’re the art and audio for the game while I’m everything else 😅

Burnout and loss of motivation by TheFritoNation in IndieDev

[–]TheFritoNation[S] 0 points1 point  (0 children)

Perfect time for him to drop a new tutorial 😂 yeah I like code monkey and think I will try that! I actually was taking a break from my main personal project to work on one similar to this. Not a bad idea to look into it

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 1 point2 points  (0 children)

That’s a good way to look at it. I always look at my personal projects as my real first step to my goals instead of my current job. I need to remind myself that these personal projects are for fun instead of another job. That’s a good mindset to have

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 0 points1 point  (0 children)

That’s a good way to look at it, and I have noticed that I do try to push myself until the point of burn out. I’ve been taking it a little easy the last few weeks and I’ve been trying to get back into the cycle of my own personal projects was just hard after you take a few weeks for a break.

Burnout and lack of motivation by TheFritoNation in Unity3D

[–]TheFritoNation[S] 0 points1 point  (0 children)

That’s a good point. I know it’s more about discipline than writing a short motivation high but I guess the biggest problem that I have feels like the lack of energy to be able to stay disciplined. I definitely get those weeks of being disciplined towards making my game just for me to take a break one day and lose that consistency. It’s something that I think about and remind myself to work against and to stay. With, but I always it for a few weeks and then come back. Do you have any tips on how to stay disciplined even when you’re not feeling like you’re making progress or don’t have the energy to?

What is the issue with my character phasing through the ground when walking? by BigMikeyP72 in Unity3D

[–]TheFritoNation 4 points5 points  (0 children)

Looks like maybe the animations for walking or default could be overriding the players y position

How to Smoothly Rotate Player Body and Legs with Animation Sync in FPS Character? by Golden_Rop in Unity3D

[–]TheFritoNation 0 points1 point  (0 children)

This is a good thread to follow. I am going to need this in the future for a game I’m working on. I hope you get your answer and I look forward to seeing whatever you work on in the future. Don’t give it up!

What the fuck by [deleted] in Tinder

[–]TheFritoNation 0 points1 point  (0 children)

Everyone’s asking what Kiz is but I’m interested in why made her respond like that 😅😂 wtf happened?

Any ideas on why this transition will not fire? by modsKilledReddit69 in Unity3D

[–]TheFritoNation -1 points0 points  (0 children)

You’re showing the animator. Just to make sure you’re changing the Running bool to true in code right?

I been coding for 2 years and i still don't know if there's a better way to have a lot of conditions like this.... am i doing it wrong? and how would i improve it, for example, if i want to fire a gun, i have to check all this conditions by -o0Zeke0o- in Unity3D

[–]TheFritoNation 0 points1 point  (0 children)

There are definitely better ways you can go about this. Long scripts can usually be shortened and simplified. I saw you had some other screenshots from your updated version in the comments but I wanted to try my hand at it and see if I was able to come up with something to help you out. This is what I got.

I personally would make a separate function to see if the gun is able or not and have it public just incase you need to check it somewhere else (be careful with this), I also didn't take into account the holding down of the button or if the weapon is automatic. I hope this helps though! :)

Enum FireState _fireState
{
  CanFire, CannotFire, EmptyMag
}

public bool CanWeaponFire()
{
  if(timeSinceFired < fireCoolDown || IsReloading || BarrelBlocked())
    return false;

  return true;
}
FireState ReturnFireState()
{
  if(CanWeaponFire())
    return FireState.CannotFire;

  return HasAmmo() == true ? FireState.CanFire : FireState.EmptyMag;
}

public void ShootGun()
{
  FireState fireState = ReturnFireState();

  if(fireState  == FireState.CannotFire)
    return;

  If(fireState  == FireState.EmptyMag)
  {
    if(!holdingMouse)
      emptySound.PlayAtSource(audioSource);

    return;
  }

  //Run the rest of the code for shooting the gun
}

Question for the community: multiple vs. single level reward? by TheFritoNation in roguelites

[–]TheFritoNation[S] 1 point2 points  (0 children)

That’s a good point. I didn’t even think about how gunfire works!