279 reputation
211
bio website
location
age
visits member for 2 years, 3 months
seen Sep 28 at 10:22

Sep
2
comment Determining a sensible gear-like hierarchy for a series of connected objects
If you want an algorithm to find a master gear - there's really none. This is what I was having issues with to begin with. Now that I have abandoned the idea that one can be found, it makes the solution much easier to attain.
Aug
3
comment How can I trigger an event each time the rotation of my rigidbody2D is at a given value?
The algorithm will need be dynamic. I am thinking that I can accumulate rotations from delta orientations each frame, which can be calculated from Atan2 or Quaternions.
Aug
3
comment How can I trigger an event each time the rotation of my rigidbody2D is at a given value?
Thank you for your response. It works but it is not accurate enough when increasing the angular velocity. This is still true when increasing the deadzone. I need to rethink my approach, perhaps a delta rotation approach will be more accurate?
Aug
2
comment Determining a sensible gear-like hierarchy for a series of connected objects
That's a good point, thank you.
Jul
23
comment Timing of coroutines in Unity is never precise
This sort of precision would be required when generating musical events at regular intervals at higher tempi. Subdividing of pulse and the like.
Jul
23
comment Timing of coroutines in Unity is never precise
Precise timing of musical events at high tempi?
Jun
29
comment Why is anti aliasing not being applied to my 2D objects in Unity?
Excellent, I shall try that. Thank you.
Jun
16
comment Unity - Avoid using Find method by caching UnityObjects - Code review
Excellent, thank you.
Jun
16
comment Unity - Avoid using Find method by caching UnityObjects - Code review
But the class itself has the code to self destruct and remove the game object. Do I have to check whether this is the original object and not a clone then. Can't the original object be deactivated in some way so it doesn't have to exist in the game world and only the instantiated clones exist?
Jun
16
comment Unity - Avoid using Find method by caching UnityObjects - Code review
If one of those objects called GameObject.Destroy(this.gameObject); in their original code. How could I make sure that further instances could be created? See my edit.
Jun
16
comment Unity - Avoid using Find method by caching UnityObjects - Code review
I like the idea of single instance classes taking care of themselves, thank you. As for instantiating objects from a cache, is comparing the type T with GetType a bit icky?
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
So 'camera' is a protected name.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
I'm still getting a warning that I am hiding an inherited member 'UnityEngine.Component.camera' if I go with this approach though.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
Ah, I see. That's what has been confusing me. Thank you.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
Debug.Log(GetComponent(typeof(FlyThroughCamera))) returns null
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
I have added a screenshot as requested.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
GetComponent still returns null, even though the class exists and is linked via the Inspector window.
Jan
12
comment Trying to access another class that is outside my Unity script but casting is failing
I have added the FlyThroughCamera on my GameObject in the inspector but the cast will revert it to null. If I delete the cast code then I will get a warning about hiding inherited members because it is not instantiated in any way.
Jan
11
comment My method for switching between cameras in Unity does not change the main camera
Good thinking. How would I find all cameras in the scene regardless of their activity?
Sep
19
comment Drawing transparent and opaque 3D objects. How do I preventing z-fighting?
Near clip is currently 0.1f and the far clip is 1000f. I was thinking that should be precise enough?