unity – Model missed by both EventSystem.current.RaycastAll and IPointerClickHandler when scaling time

I have a situation where a model is ignored in favour of one behind it. The rear model is returned by EventSystem.current.RaycastAll, and the front model’s IPointerClickHandler callback isn’t triggered if the rear model is present. The rear model does not implement IPointerClickHandler (or pointer up/down handlers, etc). Both these things work on the front model if the rear model isn’t there.

Debugging shows that the Raycast is only returning one result. By comparing behaviour when the rear model is and isn’t present, I can verify that the distance value in the RaycastResult is greater when hitting the rear model than when hitting the front model.

I can “fix” the problem by using the Inspector to disable and re-enable the front model.

Here’s the problem and the “fix” in action:

Tooltips fixed by disabling and re-enabling an object

Higher quality version here.

EventSystem.current.RaycastAll is used to power the tooltips, and IPointerClickHandler is (unsurprisingly) used to get the cube model to react to clicks.

Update: After more investigation, I’ve made limited progress:

  • I’ve fixed the problem when running the game at normal speed by giving both objects a kinematic Rigidbody.
  • However, the problem still occurs when I speed up time. I set Time.timeScale, and increase Time.fixedDeltaTime by the same scale factor as recommended here.
  • I can eliminate the problem by not changing Time.fixedDeltaTime, however I’m reluctant to do so since this has a big impact on framerates at higher speeds (12x being the highest available).

enter image description here

Again, higher quality version here

Unity version: 2020.3.11f1

Update 2: As requested, here’s the raycast and time scaling code:

public class TooltipDisplay : MonoBehaviour {
    public void FixedUpdate() { // I've tried it in Update too, no change
        PointerEventData pointerData = new PointerEventData(EventSystem.current);
        pointerData.pointerId = -1;
        pointerData.position = Mouse.current.position.ReadValue();
        List<RaycastResult> results = new List<RaycastResult>();
        EventSystem.current.RaycastAll(pointerData, results);
        Tooltip highest = null;
        foreach (var result in results) {
            // There's only one result here, and it's often the wrong one :(
            Tooltip t = GetTooltip(result.gameObject);
            if (t == null) continue;
            if (highest == null || t.priority > highest.priority) {
                highest = t;
            }
        }
        // If we found a tooltip, display it.
        // ...
        // ...
    }
}


public class SpeedLimiter {
    
    private int multiplier;
    private static readonly float DEFAULT_FIXED_DELTA_TIME = Time.fixedDeltaTime;
    public const float SECONDS_PER_COMMAND = 2.0f;
    public float timeAccumulated { get; private set; }
    
    // Called from a Unity Button press (bottom-right of video) or from an Input system keypress handler.
    public void SetMultiplier(int speed) {
        multiplier = speed;
        Time.timeScale = multiplier;
        Time.fixedDeltaTime = DEFAULT_FIXED_DELTA_TIME * multiplier;
    }

    public bool Advance() { // Called in Update
        bool looped = false;
        timeAccumulated += Time.deltaTime;
        while (timeAccumulated >= SECONDS_PER_COMMAND) {
           timeAccumulated -= SECONDS_PER_COMMAND;
           looped = true;
        }
        return looped;
    }
}


public class UHexahedron : MonoBehaviour {
    Vector3 fromPosition;
    Vector2 toPosition;
    float translationStart;
    float translationDuration;
    bool translating;

    public void FixedUpdate() {
        if (translating) {
            float currentTime = SpeedLimited.timeAccumulated;
            if (currentTime < translationStart) return;
            if (currentTime >= translationStart + translationDuration) {
                Translate(1);
            }
            else {
                float lerp = (currentTime - translationStart) / translationDuration;
                Translate(lerp);
            }
        }
    }
    
    private void Translate(float lerp) {
        if (lerp >= 1) {
            transform.position = toPosition; // Tried rigidbody.position, no change
            translating = false;
            return;
        }
        transform.position = Vector3.lerp(fromPosition, toPosition, lerp); // Again, tried rigidbody.position, no change.
    }
}

unity – Model missed by both EventSystem.current.RaycastAll and IPointerClickHandler unless disabled and re-enabled in the Editor

I have a situation where a model is ignored in favour of one behind it. The rear model is returned by EventSystem.current.RaycastAll, and the front model’s IPointerClickHandler callback isn’t triggered if the rear model is present. The rear model does not implement IPointerClickHandler (or pointer up/down handlers, etc). Both these things work on the front model if the rear model isn’t there.

Debugging shows that the Raycast is only returning one result. By comparing behaviour when the rear model is and isn’t present, I can verify that the distance value in the RaycastResult is greater when hitting the rear model than when hitting the front model.

I can “fix” the problem by using the Inspector to disable and re-enable the front model.

Here’s the problem and the “fix” in action:

enter image description here

Higher quality version here.

EventSystem.current.RaycastAll is used to power the tooltips, and IPointerClickHandler is (unsurprisingly) used to get the cube model to react to clicks.

Unity version: 2020.3.11f1

Unity: Model missed by both EventSystem.current.RaycastAll and IPointerClickHandler unless disabled and re-enabled in the Editor

I have a situation where a model is ignored in favour of one behind it. The rear model is returned by EventSystem.current.RaycastAll, and the front model’s IPointerClickHandler callback isn’t triggered if the rear model is present. The rear model does not implement IPointerClickHandler (or pointer up/down handlers, etc). Both these things work on the front model if the rear model isn’t there.

Debugging shows that the Raycast is only returning one result. By comparing behaviour when the rear model is and isn’t present, I can verify that the distance value in the RaycastResult is greater when hitting the rear model than when hitting the front model.

I can “fix” the problem by using the Inspector to disable and re-enable the front model.

You can find a video of the problem and “fix” in action here: https://imgur.com/a/Oku79iB

EventSystem.current.RaycastAll is used to power the tooltips, and IPointerClickHandler is (unsurprisingly) used to get the cube model to react to clicks.

Unity version: 2020.3.11f1

what I missed when writing a c# code from this pseudocode

what I missed when writing a c# code from this pseudocode – Code Review Stack Exchange

iphone – How can I tell how long a missed call attempted to ring for?

Sometimes autodialers call many numbers at the same time and direct the person (often a scammer or marketer) on the other end to whoever answers first. For this reason, I sometimes get missed calls where the caller only hangs on for 1-2 rings. When I see this, it’s obvious that I can block that number. But when I view my phone and there are several calls from unknown local numbers in the missed calls list, I cannot find any way to differentiate between legitimate phone calls and the scammer calls. So if you were expecting an important call from an unrecognised number, there’s a good chance you’ll call back some scammers before you get the legitimate caller.

But there’s a high likelihood that those calls that stopped after ~1 – 2 rings were scams and the ones that hung on for ~4+ rings were legitimate. The problem is, without seeing the attempted call in progress (to count the rings), I cannot differentiate the calls based on how many rings they hung on for.

For a missed call, without seeing it and counting, is there any way to tell how long the missed call attempted to call for (e.g. 1 ring, 5 rings, 10 rings etc)?

i missed my aliexpress delivery what do i do?

I got a voice message, in mandarin which was very inconvenient as my mandarin is pretty nonexistent, saying ‘no one was here to receive the package’ I believe. I have no idea what company was delivering my package and no idea if they are going to redeliver it again, so I’m not sure how to contact them. What do i do? I tried asking the seller but they just said ‘contact local shipping company’.

altcoin – If my service only accepts Bitcoin, will there be a lot of missed customers who only have non-Bitcoin crypto currencies?

I’m about to release a service which only takes payments in Bitcoin.

I’m wondering if this will impact me negatively in terms of not getting business from people who own other crypto currencies.

I don’t reject the others out of ideological reasons, but for practical ones:

  1. My hard disks are already overflowing from the 335.8 GB Bitcoin blockchain.
  2. I barely trust Bitcoin Core to run on my computer — I don’t trust non-Bitcoin clients whatsoever.
  3. Even if I did have the storage space and the trust, I would have to learn the respective RPC APIs (assuming they exist) for each “altcoin” as well. It took me a very long time to grasp the Bitcoin Core API.
  4. Any kind of reliance on a third-party service is unthinkable due to KYC/AML BS, as well as the obvious risk with getting my money stolen if somebody else “holds them for me”.

Is there any way around this? Is there some kind of mega-trusted “multi-coin” client which doesn’t need to download the entire blockchains, yet is able to securely and locally handle multiple of the biggest altcoins, so that I could support those for payments?

Or would anyone who has altcoins also have Bitcoin? I get the feeling that they are very, very few, but perhaps they are also more likely to spend their coins compared to the stubborn “HOLDers” of the increasingly valuable Bitcoin?

I know myself that I’m very unwilling to part from any of my Bitcoin, especially as the price is increasing… It’s just a fact for me, but I can’t speak for others. I don’t have any other crypto currencies myself, and the times I’ve looked into them, I’ve just been put off by their software. (In the cases where software even exists!)

Advice?

dnd 5e – Can I replay an AL module with the same character to get a treasure I missed?

I was wondering about the rules on replaying an official D&D 5e Adventurer’s League module with the same character:

If I am willing to forgo taking anything with me during the initial session (ie, no xp, rewards, DT days, renown, gold etc), can I run it a second time with the same character?

The reason being that this is the only module in all three seasons that has a weapon my character is able to use, and I’d like a second chance at rolling for it.

web – Why has the Internet died? Is there some sort of new Internet that I’ve missed?

I send e-mails to mailing lists. No reply for weeks upon weeks. Dead.

I ask questions on Stack Exchange. No replies. Ignored. Just trolls and toxic people left.

I left freenode because every room was a ghost town in the last few years.

Every search query results in irrelevant garbage and/or eternal reCAPTCHAs.

Fake sites, registration forms that don’t do anything, “phone verification”, “upload photo id to load page”, etc.

The “dark web” doesn’t seem to actually exist at all. I do have Tor browser installed but there are no .onions to visit either.

Nothing seems to work. Nothing (worthwhile) seems to be used at all.

I’ve looked all over for some sort of “new Usenet”, but there is no such thing. All those decentralized projects are minimal and have zero users, in perpetuity.

I feel like I’m going insane. What has happened? How can there be far less activity on the Internet today than it was 30 years ago? How is that logically possible?

I might as well be offline completely. I basically feel like I am.

android 10 – How do I block “you missed a call from…” messages for blocked spam calls?

Android does a great job of blocking spam callers. However, my phone provider sends me messages when I miss calls, so while I don’t receive the spam calls themselves I always receive these follow-up sms in my inbox;

enter image description here

I don’t want to disable these SMS as they’re genuinely useful to receive when I miss calls from people I actually know. Also, clearly Android knows that this message is related to a spam caller, since it has flagged the message, so how can I get Android to just block these messages?

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123