This repository was archived by the owner on Dec 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
intermediate
Antoine Charton edited this page Apr 23, 2018
·
61 revisions
- Basic operations and patterns (condition, make a counter...).
- A character reacting to an user input
- Create a new scene, and add a cube gameobject (/Gameobject/3D/Cube).
- Add a ConstellationBehaviour component to the cube.
- Create a new Constellation. Give it a cool name.
- Add your script to the ConstellationBehaviour component.
- You are setted!
- Store the value to add and push it on Update.
- Store the current count.
- Add the current count to the incremental value.
- To store a character life. In this example the S key simulate an event that make the character loose some life.
- Moving a character.
- Condition node works like a if in programming.
- The first attribute is the condition. There are 6 of them:
==,<=,>=,!=,<,> - The $ sign followed by a number represent the input that is checked. For example
$1refers to the first input.$3refers to the last one. - The then field can output a constant number or word. For example if you enter 1 in this field the node will output one when the condition is met. If you put $1 on this field it will output the first input of the if node.
- The else field work the same as the then field but output a value if the condition aren't met.
- $1.
- $2.
- $3.
- Output a variable when condition is met.
- Output variable when condition is not met.
- Always output a variable.
- Character controller node will add the Unity CharacterController component on the gameobject on which the constellation is attached to.
- You need to use Delta times if your framerate is not constant. Keep in mind there is a lot of different ways to achieve this. You could also use a transform or rigid body node depending on what kind of movement you need.
- The camera ray node needs a 2d position relative to your screen. It outputs an an array of 3 floats (x,y,z).
- The LookAtPosition node needs the position of the GameObject and the position of where it should look at. When the warm input is triggered it outputs a target rotation.
- At the end you split the target rotation to get only the Y axis of the target rotation. An extra step could be to smooth over time this value so your character does not rotate in one frame.
- Make a script so the camera look at your moving character.
Hint you will need an object attribute node to track your character.
[Error codes] link



