Lets say I have two points for raycasting:
D3DXVECTOR3 rayFrom(...); D3DXVECTOR3 rayTo(...);
How do I make the line length "rayFrom" increase?
I'm looking to increase the line length each frame.
Jump to content
Posted 11 January 2013 - 09:53 PM
to make any ray longer, you just multiply if by a scalar.
Meaning, if you have a ray, and you multiply it by two, the ray is twice as long . . .
Posted 12 January 2013 - 05:02 AM
@smasherprog: I don't want it to be like that.
Lets say I have a ray its length is 100, I want to increase it's length slightly by 5 or 8 more, so it become 105.
So I want to do something like rayLength(rayTo, 5); this will make the ray length 105 instead of 100
The ray length should increase to get more hits, so rayFrom should be the same, rayTo should be increased.
Important: rayTo should increase according to its own direction.