I would love some clarifications on the wheelDelta, is it the same as the browser MouseEvent or is it something internal exclusively to PC?
Would there be the need to make some adjustments in order to attach the events or is it done automatically by the engine (both editor and API).
So there is a difference so the window version gives you an actual delta value however due to browser differences the PlayCanvas one will snap to either 1 or -1 depending on direction
PlayCanvas MouseEvent class:
// deltaY is in a different range across different browsers. The only thing
// that is consistent is the sign of the value so snap to -1/+1.
if (event.type === 'wheel') {
if (event.deltaY > 0) {
this.wheelDelta = 1;
} else if (event.deltaY < 0) {
this.wheelDelta = -1;
}
}
Maybe I wasn’t clear enough in the original question.
what i’d like to know if the engine is listening to the browsers mousewheel event which seems to be tagged as deprecated and not standard → Element: mousewheel event - Web APIs | MDN or is it listening to this one WheelEvent - Web APIs | MDN ? so it’s safer to use and won’t give future issues