thing is, my virtual lines start from a cursor on screen, so how would i modify that, so that the line starts or passes through the cursor point on screen?core::line3d<f32> line;
line.start = camera->getPosition();
line.end = line.start + (camera->getTarget() - line.start).normalize() * 1000.0f;
2- i was wondering if this equation would be right for an enemy Aggro radius:
3- is there an equation like camera->getposition(); that returns the position of an enemy(model) ? and if so, what variable type does it return?aggro_distance =30
current distance =| |enemyposition| - |playerposition| |
if (current_distance<=aggro_distance)
enemy attacks player
4- assuming i'm going to be projecting a lazer beam effect from the cursor point, to the model, assuming i'm going to use a bitmap texture or so, how would i scale it to make it grow smaller the further it goes and while i'm at it, make it not draw past the model it collides with?
thanks in advance.
thanks in advance.