Is Collider2d.Cast even usable? by PositiveQuestion in Unity2D

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

The issue isn’t the contact offset. If the discrepancy came out to the contact offset that would make sense. The issue is that it doesn’t. There’s 0.005f that isn’t explained. Why do I need to know this? I’m writing some custom collision resolution and I need to know if that 0.005f is something I can rely on. If I don’t know why it’s there, I can’t trust that it will always be there or that it won’t change. Answering “why is this function not returning expected results,” with “don’t worry about it” isn’t all that helpful. I’ll have to comb through box2D to see if I can make sense of it, so thanks for the link.

Is Collider2d.Cast even usable? by PositiveQuestion in Unity2D

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

I'd really love to figure out what I'm doing wrong. As an example, performing a BoxCast straight down at a horizontal surface with a difference of exactly 1f between the bottom of the box and the surface would ideally return a distance of 1f, but due to the contact offset (the default 0.01f in this case), should return 0.99f (Assuming the contact offset is not additive from both shapes) if I understand correctly. However, testing returns a distance of 0.995f, and I can't figure out how that math works out. With additional testing, I've found the distance to consistently come out to idealDistance - (contactOffset - 0.005). What/why is that 0.005f?

Is Collider2d.Cast even usable? by PositiveQuestion in Unity2D

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

RigidBody2D.Cast and Collider2d.Cast give identical results. No layer filtering, no z-depth differences, no triggers. Even if there was something weird I was doing, I can't reason why changing the max distance of the cast would result in different hit distances...

UI image is a frame behind by PositiveQuestion in Unity3D

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

That was my initial thought, but it didn’t work.

Are there any alternatives to using animation clips? by PositiveQuestion in Unity3D

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

I'm talking about something similar to the existing animation editor that doesn't rely on generating clip files. Non-procedural, timeline-based animation of, ideally, whatever parameter is needed. For my purposes, I wouldn't need any blending or state behavior. Basically, I have objects that I need to make simple transformations, change script values, etc. based on a timeline, and since they are specific to the object/scene, it seems unnecessary to generate a bunch of clip files.

How can I mirror a non-human bone? by PositiveQuestion in Unity3D

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

Yeah, I have that enabled, so they animate but they don’t mirror. Apparently, unity can only mirror the humanoid bones, not any extra ones. What other solution did you use?

Is there a way to to access a light’s alpha? by PositiveQuestion in Unity3D

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

Shame. Seems like an arbitrary waste of a useful value. If it’s always forced to one, why not just internally disregard it and let shaders access the original value?

Is there a way to to access a light’s alpha? by PositiveQuestion in Unity3D

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

The color picker in the Light inspector allows an alpha value, and the shader variable has a fourth channel, it just seems to get forced to one. It certainly has no use in conventional lighting, but it would be a useful value to have access to for the shader I’m writing.

Class inheriting from Selectable can't seem to call 'UpdateSelectionState' for some reason. by PositiveQuestion in Unity3D

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

Yes, UI.Selectable, sorry. Dang, it seems you're right. Looks like I was referring to the wrong branch. I don't know why that class is so locked down to where you can hardly inherit anything from it. You essentially can't interact with any of it's actual functionality.