SceneManager:CastObstacleRay

From Data Realms Wiki

(Difference between revisions)
Jump to: navigation, search
Beautifybot (Talk | contribs)
(updating function page)

Latest revision as of 00:48, 28 June 2012

Function
SyntaxCastObstacleRay( * The starting position.
  • The vector to trace along.
  • A reference to the vector screen will be filled out with the absolute location of the first obstacle, or the end of the ray if none was hit.
  • A reference to the vector screen will be filled out with the absolute location of the last free position before hitting an obstacle, or the end of the ray if none was hit. This is only altered if thre are any free pixels encountered.
  • An MOID to ignore. Any child MO's of this MOID will also be ignored.
  • To enable ignoring of all MOIDs associated with an object of a specific team which also has team ignoring enabled itself.
  • A specific material ID to ignore hits with.
  • For every pixel checked along the line, how many to skip between them for optimization reasons. 0 = every pixel is checked. )
Description:
Traces along a vector and returns the length of how far the trace went without hitting any non-ignored terrain material or MOID at all.
ReturnsHow far along, in pixel units, the ray the pixel of any obstacle was encountered. If no pixel of the right material was found, < 0 is returned. If an obstacle on the starting position was encountered, 0 is returned.




Example
DescriptionPlaceholder!
Code
  1. for k,v in pairs(PagesWithoutExamples) do
  2.     v.MakeExample(NoErrors);
  3. end
OutputPlaceholder!
Personal tools