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

bge.types.KX_CharacterWrapper.rst « bge_types « rst « python_api « doc - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4d9dd5b5c3444e761b3f3c71e92892de39bf3ea8 (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
KX_CharacterWrapper(PyObjectPlus)
=================================

.. module:: bge.types

base class --- :class:`PyObjectPlus`

.. class:: KX_CharacterWrapper(PyObjectPlus)

   A wrapper to expose character physics options.

   .. attribute:: onGround

      Whether or not the character is on the ground. (read-only)

      :type: boolean

   .. attribute:: gravity

      The gravity value used for the character.

      :type: float

   .. attribute:: maxJumps

      The maximum number of jumps a character can perform before having to touch the ground. By default this is set to 1. 2 allows for a double jump, etc.

      :type: int

   .. attribute:: jumpCount

      The current jump count. This can be used to have different logic for a single jump versus a double jump. For example, a different animation for the second jump.

      :type: int

   .. attribute:: walkDirection

      The speed and direction the character is traveling in using world coordinates. This should be used instead of applyMovement() to properly move the character.

      :type: list [x, y, z]

   .. method:: jump()

      The character jumps based on it's jump speed.