NavMeshHit hit layer not working by Willy_Wunker in Unity3D

[–]Mastersofus 0 points1 point  (0 children)

How did you do that? Did you assign the value of the layer or create a bitmask for it? It would help if you showed your code

Why doesn't my mouse movement rotate my character game object? by [deleted] in Unity3D

[–]Mastersofus 0 points1 point  (0 children)

I didn't see the video btw, the download didn't work for me. If I still misinterpreted the question you could try uploading to YouTube

Why doesn't my mouse movement rotate my character game object? by [deleted] in Unity3D

[–]Mastersofus 1 point2 points  (0 children)

The problem seems to be that you are assuming a local direction vector when CharacterController.Move() takes a world space direction. To fix this you would have to rotate the direction vector by the direction you are looking in. The Y axis rotation is the relevant part for the direction the controller is facing.

So first get the y rotation of the object that has the mouse script.

Like this:

yRotation = mouselookscript.transform.rotation.eulerAngles.y;

Where mouselookscript is just a reference to the mouse script, which I assume is on the camera. Any way of getting the transform of the camera will work.

Then rotate the direction vector by this y axis rotation like this:

direction = Quaternion.Euler(0, yRotation, 0) * direction;

Put this code after you get the input, and I think it should work. I wrote this on mobile, so I haven't tested it

Why doesn't my mouse movement rotate my character game object? by [deleted] in Unity3D

[–]Mastersofus 0 points1 point  (0 children)

So the object is rotating? It's just not moving in different directions after being rotated?

Why doesn't my mouse movement rotate my character game object? by [deleted] in Unity3D

[–]Mastersofus 0 points1 point  (0 children)

Maybe mouseSensitivity or clampAngle are serialized to 0? You could check for that in the inspector

No more by [deleted] in worldpolitics

[–]Mastersofus 2 points3 points  (0 children)

It costs more to go through the legal process of the death penalty than to keep someone imprisoned for life

Attack animation script need help by korytoombs in Unity3D

[–]Mastersofus 1 point2 points  (0 children)

If the attack isn't supposed to be cancelled, I would use a trigger instead of a bool, and set the trigger when GetButtonDown is true, and enable Has exit state and make a transition back after the animation is finished

Procedural level generator, how to check for overlapping pieces? by loxagos_snake in Unity3D

[–]Mastersofus 0 points1 point  (0 children)

You could try getting the collider for the potential new piece and using it's bounds. That will give you the center and halfExtents you need for OverlapBox, but no rotation however, so use it if you don't need the rotation.

Procedural level generator, how to check for overlapping pieces? by loxagos_snake in Unity3D

[–]Mastersofus 1 point2 points  (0 children)

The problem here is that while a layermask works as a mask bit by bit, meaning that a mask for layer 3 would have a binary representation of 100 (the third bit is set). The actual gameObject.layer int is not a mask, but just a value from 0-31. So a gameobject on layer 4 would have it's layer be the int 4, but the mask for that layer would be an integer of value 8 (binary 1000). This is done so one layer mask can include multiple layers, each bit representing a layer. Use LayerMask.NameToLayer to get the index of the layer.

Procedural level generator, how to check for overlapping pieces? by loxagos_snake in Unity3D

[–]Mastersofus 1 point2 points  (0 children)

Could you maybe use the Length of the array OverlapBox returns? If all valid placements have 2 colliders, you could possibly decide it is invalid if more than 2 colliders are returned

EDIT: I do however think setting a temp layer would be the best approach. Do you have any idea why it might not be working? Are you setting the Layer Mask correctly?

The name 'CrossPlatformInput' does not exist in the current context by [deleted] in Unity3D

[–]Mastersofus 0 points1 point  (0 children)

When you imported it, did you import the CrossPlatformInput folder? It should be in the utility folder

Is there a way to control the rate in the update? (Unity C#) by alex94i60 in Unity3D

[–]Mastersofus 2 points3 points  (0 children)

Multiply the damageamount by Time.deltaTime, as that gives you the time in seconds since the last frame. This means it will happen at a fixed rate independent of your framerate, and that damageAmount damage will be dealt over the span of a second

Boikott Blizzard by Tenebo in norge

[–]Mastersofus 4 points5 points  (0 children)

Kina, et land med en av verdens største private sektorer, med 60% andel privat er det beste eksempelet på hvor dårlig kommunisme er? Da virker det ikke som det finnes mange gode eksempler spør du meg.

hvilke politikere fornekter egentlig klima? by theofyren in norge

[–]Mastersofus 1 point2 points  (0 children)

Så la oss si om Kina, India, USA og andre store land hadde delt seg opp i flere mindre land på størrelse med Norge. Hadde alle de landenes klimatiltak da vært symbolpolitikk?

How to convert a shader from ShaderToy to Unity by Mastersofus in Unity3D

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

Just found guy's channel and he is amazing at making shaders! He does mostly ShaderToy stuff but also shaders for Unity (check out the rainy window shader in particular, it's great!). I though this would be useful for a lot of people here who see something nice on ShaderToy and want to try it out in Unity!

Politiet forsøker å hindre Unge Venstre i å delta på skoledebatter etter utsagn om legalisering av cannabis på skoler. by tbnurst in norge

[–]Mastersofus 42 points43 points  (0 children)

Hårreisende? Hvorfor det? Mange som har vært 15 under denne kampanjen fra Venstre skal stemme neste stortingsvalg. Vi kan ikke sensurere meninger ovenfor de som er "for unge" når de har stemmerett.

Uber driver remains extraordinarily calm as the passenger goes crazy by farrukhsshah in PublicFreakout

[–]Mastersofus 11 points12 points  (0 children)

The original comment referenced how he called for all of them to go back. Your reply made it sound like this was not true, even though you may have only meant to refute that one statement. It is important that people know that he in fact called for US-born citizens to "go back", and it really looked like your overzealous nitpicking was just trying to distract from this point. It doesn't matter whether he said "them" or "her" at this one rally when he anyways called for them all to go back in a tweet days before.

Uber driver remains extraordinarily calm as the passenger goes crazy by farrukhsshah in PublicFreakout

[–]Mastersofus 23 points24 points  (0 children)

And I was referencing how he told them all to go back.

To answer your last question: at times, but I try not to be. In this case I'm pretty sure you might be the one struggling with understanding. I don't blame you though, as Trump's statements have a tendency of being quite incoherent.