3D FPS with bullet object instead of raycasting

you have two choices
use my extension Forces and Positions
i recommend you not only because i need feedback or popularity but because it is easier

but you also can use these three formulas

setX + force * cos(ToRad(Angle2D)) * cos(ToRad(Angle3D))
setY + force * sin(ToRad(Angle2D)) * cos(ToRad(Angle3D))
setZ + force * sin(ToRad(-Angle3D))

force could be (40)
Angle2D could be (CameraAngle+90) -the offset is important-
Angle3D Could be (CameraRotationX+90) - the offset is important-

you could do based on object orientation aswell

Object.Angle()
Object.RotationY()
(no offset needed)

2 Likes