Author Topic: Raycast with store Hit Point every frame  (Read 3119 times)


  • Full Member
  • ***
  • Posts: 112
Raycast with store Hit Point every frame
« on: November 17, 2012, 03:15:53 PM »
Hey, what about this Raycast with storing the Hit Piont right away, every frame? Get Raycast Info doesnt do the trick, since it's just once and gets whatever raycast on scene. I'm trying to do an "invert mouse pick" in TPP game.

Cursor will be actually going in the proper direction. I'm Getting the local XYZ of the object that follows cursor. Then, I'm multiplying Y by -1, and Setting the position of the other Object to XYZ. So far works great, looks like invert mouse. The second Object will raycast every frame... and I need to be able to get hit point every frame, to move the Crosshair to that point. Strange request, but there are still people who like their cursor going up, when they move the mouse down... (but only in game! Menus should be normal)

Actually... Invert mouse option in Mouse Pick action would be even better for this case. :) But still, I'll probably need what I wrote above at some point, to do other things with raycasts, like spawn decals or something.