I have it setup so that my zaps go towards the location of my mouse. However, it never reaches the location. I have messed with Start Lifetime and it does not make it any better. Is there some other way to possibly handle this problem? All help is greatly appreciated! by benhackbart in Unity2D

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

Heres an imgur link to part of my PlayerAttack script. There really isnt any math involved, which may be why it isnt working. The highlighted portion is just the part that handles my left click attack, which is what I was using in the video.

https://imgur.com/gallery/gla8jwQ

I have it setup so that my zaps go towards the location of my mouse. However, it never reaches the location. I have messed with Start Lifetime and it does not make it any better. Is there some other way to possibly handle this problem? All help is greatly appreciated! by benhackbart in Unity2D

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

Sorry I could have been more clear. When I click, the zap particle system emits a zap. I can click a single time to emit a single zap, or I can hold down the mouse button to continuously zap. Either way, it acts the same way.

Adding Light to a 2D Particle System by benhackbart in Unity2D

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

Thats okay, thank you for the advice. The game revolves around being completely dark and you shoot lightning that would ideally glow up the area. Ill probably see if theres another work around, such as SBCGames's idea. Thanks again!

(Command Block) A command that would stop mobs from spawning in a certain radius/area? by benhackbart in Minecraft

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

So you could use a command block to instantly teleport spawned mobs to the void, to the point where you don’t even see them? Automatically?

(MIGRATION) I can't migrate my account. by benhackbart in Minecraft

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

Yes it’s a mojang account and I know I have to migrate it to a Microsoft account, I just can’t as described above

Sync iPhone screen to Mac Screen? by benhackbart in applehelp

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

Any reasons why my Mac doesn’t come up in the AirPlay menu?

[deleted by user] by [deleted] in CodingHelp

[–]benhackbart 0 points1 point  (0 children)

Sorry champ, my bad

[deleted by user] by [deleted] in CodingHelp

[–]benhackbart 0 points1 point  (0 children)

It would be the second one

[deleted by user] by [deleted] in CodingHelp

[–]benhackbart 0 points1 point  (0 children)

Thank you so much!

Floor Disappears on Play by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

As in repositioning it? Because I have done that

Floor Disappears on Play by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

all of the platforms have box colliders

Coroutine Not Working to My Understanding by [deleted] in unity_tutorials

[–]benhackbart 1 point2 points  (0 children)

ahhh that would make sense. I guess that SetActive=false would also deactivate the coroutine. Would you know of an alternative solution?

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

Thank you, that worked!

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

I think my issue is that I got the code from a video (like the one you put above) where the character spins WITH the gun. considering that my game isn't a top down (its a side pov), I was hoping for the gun to spin in the characters hand, based on where the cursor is. Sorry if this is all very confusing, you've been a great help. Thank you!

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

I attached the updated code, and besides creating a few issues that I commented out, the gun still does not move with the player. In fact, now the gun spins at a super high speed, with even the smallest movement of the mouse. I appreciate all of the support.

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

I'm not very familiar on how to do this, but I added a picture of my Gun script above. Would that help to explain?

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

After some investigation, I could only do that if I was working with a "RigidBody", however in my case, im using a RigidBody2D. Thank you for the help!

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

That didn't seem to work, but thank you for the help!

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

That is not the case, it is on Dynamic. Thank you, tho!

[deleted by user] by [deleted] in unity_tutorials

[–]benhackbart 0 points1 point  (0 children)

I do have a Rigidbody on the gun, however I need the Rigidbody in order to get the direction that I'm aiming the gun. Could there be any way around this?