You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whether to unify single-point Touch and Mouse events needs to be discussed. From the point of view of ease of use for developers, I think we need to unify!
Before we only consider mouse, but now we should consider mobile device(touch). So the call back named onMouseXX() is not good, I thnk use onPointerXX() instead onMouseXX() or onTouchXX() is better for modern design.
classScript{/** * Called when the pointer is down while over the Collider. */onPointerDown(): void{}/** * Called when the pointer is up while over the Collider. */onPointerUp(): void{}/** * Called when the pointer is down and up with the same collider. */onPointerClick(): void{}/** * Called when the pointer is enters the Collider. */onPointerEnter(): void{}/** * Called when the pointer is no longer over the Collider. */onPointerExit(): void{}/** * Called when the pointer is down while over the Collider and is still holding down. * @remarks onMouseDrag is called every frame while the pointer is down. */onPointerDrag(): void{}}
Refactor existing physical event logics from the collider and raycast. Redesign the APIs, which will be consistent with PhysX in the future.
PR reviewers:@GuoLei1990, @singlecoder, @gz65555 , @zhuxudong
The text was updated successfully, but these errors were encountered: