CDemo::shoot(): I don't understand something
Posted: Tue Feb 24, 2009 4:50 am
Hi Irrlicht's community.
File:
C:\irrlicht-1.5\examples\Demo\CDemo.cpp
This is the FPS Demo in Irrlicht's SDK
Problem Location:
Function CDemo::shoot()
Problem Explanation:
I don't understand this code's purpose.
File:
C:\irrlicht-1.5\examples\Demo\CDemo.cpp
This is the FPS Demo in Irrlicht's SDK
Problem Location:
Function CDemo::shoot()
Code: Select all
// get line of camera
core::vector3df start = camera->getPosition();
core::vector3df end = (camera->getTarget() - start);
end.normalize();
start += end*8.0f;
end = start + (end * camera->getFarValue());
Problem Explanation:
I don't understand this code's purpose.