var centerScreenX = (this.app.graphicsDevice.width / 2) ;
var centerScreenY = (this.app.graphicsDevice.height / 2) ;
// get start and end point
var start = this.camera.camera.screenToWorld(centerScreenX, centerScreenY, this.camera.camera.nearClip);
var end = this.camera.camera.screenToWorld(centerScreenX, centerScreenY, this.camera.camera.farClip);
// raycast between the two points and return the closest hit result
var result = this.app.systems.rigidbody.raycastFirst(start, end);
I’m using this code for raycasting to be applied in the center screen .but the raycasting not hitting in center way
Build Link: