Welcome to mirror list, hosted at ThFree Co, Russian Federation.

bge.types.KX_RaySensor.rst « bge_types « rst « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f182a84409f3c87dd4caa3c16e867d802889a891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
KX_RaySensor(SCA_ISensor)
=========================

.. module:: bge.types

base class --- :class:`SCA_ISensor`

.. class:: KX_RaySensor(SCA_ISensor)

   A ray sensor detects the first object in a given direction.

   .. attribute:: propName

      The property the ray is looking for.

      :type: string

   .. attribute:: range

      The distance of the ray.

      :type: float

   .. attribute:: useMaterial

      Whether or not to look for a material (false = property).

      :type: boolean

   .. attribute:: useXRay

      Whether or not to use XRay.

      :type: boolean

   .. attribute:: hitObject

      The game object that was hit by the ray. (read-only).

      :type: :class:`KX_GameObject`

   .. attribute:: hitPosition

      The position (in worldcoordinates) where the object was hit by the ray. (read-only).

      :type: list [x, y, z]

   .. attribute:: hitNormal

      The normal (in worldcoordinates) of the object at the location where the object was hit by the ray. (read-only).

      :type: list [x, y, z]

   .. attribute:: hitMaterial

      The material of the object in the face hit by the ray. (read-only).

      :type: string

   .. attribute:: rayDirection

      The direction from the ray (in worldcoordinates). (read-only).

      :type: list [x, y, z]

   .. attribute:: axis

      The axis the ray is pointing on.

      :type: integer from 0 to 5

      * KX_RAY_AXIS_POS_X
      * KX_RAY_AXIS_POS_Y
      * KX_RAY_AXIS_POS_Z
      * KX_RAY_AXIS_NEG_X
      * KX_RAY_AXIS_NEG_Y
      * KX_RAY_AXIS_NEG_Z