meshes Intersect or linepick ?
Blitz3D Forums/Blitz3D Programming/meshes Intersect or linepick ?
| ||
I have a player running around the screen and need him to shoot. I have tested several methods but the one I want to persue is to use either linepick or meshesintersect so I can have a target projected onto objects in the distance. Camerapick works to a point but can give false results when the man is in certain areas as the target image drawn onscreen appears behind him and camerapick "shoots" where he shouldn`t. I have used types for bullets but I do not get the effect I want... Anyway heres the question If I use linepick how can I get it to rotate with the character. It seems that parenting it etc just means it takes the absolute X,Y,Z and ignores the rotational angle. So I thougt meshesintersect might work, but how to I get the value of the point at which they intersect so I can draw my sprite here. Any help would be great... |
| ||
No worries, I was having a block..All sorted now. The XYZ of the player did not change, but using a pivot as a reference sorted it...I think.. |
| ||
er, Cash- can you load up some code sample--- I'd like to see how you did it! I have been messing around with camerapick and linepick and using a sprite EntityZ to make a "pseudo" collision, (rather than EntityBox########). It works..., but after a number of collisons- something overloads and crashes the program. |
| ||
Linepick seems to be a pain and the results arent what I first thought. however, I have had a lot of success with parenting for example a long narrow cylinder to the player with an entityalpha of 0. This is always hidden infront of the player and by using meshesintersect with certain conditions I can pretty much do what I would expect to do with linepick. |
| ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++ The only thing is, I need to be able to determine the exact point at which the meshesintersect so I can run the "bullet hitting" routines etc...Any Ideas on how to do this please ? +++++++++++++++++++++++++++++++++++++++++++++++++++++++ |