Skip to content

ResetButton teleports if moved after Start() #114

Closed
@JeffBail

Description

@JeffBail

I have a project in which a ResetButton is attached to an object that is moved once the project is running (and after Start() is called to cache the positions). When the button is pressed and then released the resetPoses cached in ResetButton.Start() are restored by OnColliderEventPressUp and cause the button to teleport to its original location in the scene.

I was able to reproduce the problem in the ColliderEvent.unity project that comes with VIU. Just start the example and then move the "ResetButton" object a bit. Then press and release the big red button and it will jump back to its original position.

I fixed the issue by simply doing what Start() does in OnColliderEventPressEnter and it seems to work fine. I've opened pull request #115.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions