Ray casting
Ray test
import { Service, inject, PhysicsSystem, RayTestResult } from "@hology/core/gameplay"
import { Vector3 } from "three"
@Service()
class ExampleService {
private physics = inject(PhysicsSystem)
checkCollisions() {
const result = new RayTestResult()
const from = new Vector3(0,0,0)
const to = new Vector3(0,0,100)
this.physics.rayTest(from, to, result)
console.log(result)
}
}
export default ExampleService