1. #1
    Core2TOM's Avatar Senior Member
    Join Date
    Mar 2014
    Location
    Germany
    Posts
    506

    How to work with those tools?

    can someone please help me to understand some tools? because i really dont get it
    there are no help menus or even helping texts in the editor anymore, that could tell you anything...
    maybe i will never use those tools, but at least i want to understand how to work with them! thanks guys



    • Object info datasource (Type: Drivingline position) vs Player Event (Type: Reset to Drivingline / Drivingline Index)
      • The Object info datasource shows you the drivingline position in meters
      • The player event needs the position in % of the drivingline.
      • ... Why? And which part of the bike or rider do i have to select to get its exact position?

      Object Pointer vs Object Getter + Object Array
      • Object pointer (Enabled / Transfer events to all targets / Select enabled object index / Select target objects)
      • Object getter (Select Object array / Select object index)
      • Object getter requires the Object array
      • Object array (Enabled / Select target objects)
      • ... Whats the difference? For me it seems like the tools are designed differently, but doing the same thing
      • ... Can you do more with Object pointer?
      • ... Object Pointer is like Object Getter + Object Array combined?

      Selector
      • If Selector is 0 you get Value 2
      • If Selector is anything else you get Value 1
      • ... I have absolutely no idea why this could be usefull. Can anyone give me a example?

      Player event trigger (Type: Bail out) vs Player condition filter (Type: Bail out)
      • ... Whats the difference?

      Game condition filter (Type: Game Started) / (Type: Game Running) vs Player condition filter (Type: Riding)
      • ... Whats the difference?

      Scalar operator (Input Type: Vector / Operation: Lenght) / (Input Type: 2 Vectors / Operation: Dot product)
      • ... ???

      Vector object info (Type: Direction) / (Type: Side) / (Type: Direction) / (Type: Up) / (Type: Direction) / (Type: Screen position)
      • ... Does Screen position reacts on the game camera? I have no idea. The other 5 types are just ???
    Share this post

  2. #2
    Zorsselsson's Avatar Member
    Join Date
    Jan 2013
    Location
    Stockholm
    Posts
    57
    Object Pointer vs Object Getter + Object Array

    - You use object pointer to point impulses forward to events or something else.
    - Object Getter + Object Array you use if you want to switch events target objects to other objects.

    Selector

    This is really useful tool. I used it for example in a situation where an airplane has two flight modes and depending on which one is active, the selectors gives different values to the controls and Directional Force blocks.

    So I have the variable representing the flight mode (value 1 or 0). All the Selectors use that as the Selector value. If its 0 they use values 2, if its 1 they use values 1. Simple.

    Player event trigger (Type: Bail out) vs Player condition filter (Type: Bail out)

    I would guess that you use the event trigger to actually bail the rider, but with the filter you check if its true or not and direct an impulse based on the result.

    Game condition filter (Type: Game Started) / (Type: Game Running) vs Player condition filter (Type: Riding)

    Don't know if Game Started is ever false, but Game Running should probably turn to false right after the goal has been reached. Player condition filter : Riding should probably turn false after you bail out.

    Scalar operator (Input Type: Vector / Operation: Lenght) / (Input Type: 2 Vectors / Operation: Dot product)

    You use this and the other vector operator for vector calculations obviously. Use 2 vectors, Vector and a Scalar(basic number for example 10) or just a vector and calculate stuff. These are very useful, but only for advanced stuff. For example you want to make your own game with new tricky game mechanics or an advanced AI for example for an FPS game.

    Vector object info (Type: Direction) / (Type: Side) / (Type: Direction) / (Type: Up) / (Type: Direction) / (Type: Screen position)

    Easily get all three values (X, Y and Z) than separately getting them with three object info blocks.
    - Direction is the normalized vector of the direction the object is facing.
    - Side is the normalized vector of the direction the objects side is facing.
    .... Negate these and you get behind, other side etc....

    You can use these for example in a situation where you want to move a car forward where it's facing.
    - Get its position with the Vector Object Info
    - Get its direction vector with the same thing
    - Add them together with the vector operator
    - Use Object Position Event to move the object and get the position values from that vector operator block
    - The car will start moving to the direction its facing.

    Screen position hasn't worked for me so I'm not going to tell anything about that.
    Share this post

  3. #3
    Core2TOM's Avatar Senior Member
    Join Date
    Mar 2014
    Location
    Germany
    Posts
    506
    re: Object Pointer: no, doesnt work. events are no objects.

    re: Object Getter + Object Array: you can do the same with object pointer, dont you? thats why im asking.

    re: Player condition filter (Type: Bail out): just tested that... funny: Player condition filter (Type: Bail out) seems to be the nearly same as Player condition filter (Type: Riding) only switched true / false (?)

    re: Game condition filter (Type: Game Started): its false, when the game ended. thats the point. its the same as Game Running, only with other description (?)

    re: Scalar operator: i know that, but what is "lenght" and "dot product" ? thats what i dont understand.

    thanks
    Share this post

  4. #4
    Zorsselsson's Avatar Member
    Join Date
    Jan 2013
    Location
    Stockholm
    Posts
    57
    Checked about the Object Pointer from my project. Remembered it wrong. I used it to point a Set Value Event to one Variable Data Source of a group of them.
    Object Getter + Object Array I used to point an Object Position Event to one object of a group of them.

    See the difference?

    Scalar operator: length means the vectors length. For example Vectors (10,10,0) length is 14.14. It's the distance from 0,0,0 to 10,10,0.
    If you want to find out the distance from object A to B, you take the position vectors from those objects. Subtract A's position from B, and you get the vector A to B. Get its length and you get the distance from A to B. You can reverse the subtraction. Then the distance is the same but the vector is from B to A.

    Dot Product is useful to figure out if two vectors are aligned. Its value ranges from 1 to -1. If its 1 they are aligned and pointing at the same direction. -1 is that they are aligned but pointing reverse directions.

    Take the above example and imagine object A is a car. Get its Direction vector and then get the dot product of that and the vector from A to B. If the result is 1, the car is heading exactly towards object B etc...
    Share this post

  5. #5
    TeriXeri's Avatar Senior Member
    Join Date
    Mar 2014
    Posts
    1,163
    I only used the object pointer so far but in a simple way:

    If i have like 20 objects I want multiple events on, it saves time selecting them multiple times, also helps if you want to repeat certain actions to a large number of objects.

    Would love to know more about all those tools in an understandable way
    Share this post

  6. #6
    Core2TOM's Avatar Senior Member
    Join Date
    Mar 2014
    Location
    Germany
    Posts
    506
    Originally Posted by Megamanne Go to original post
    Scalar operator: length means the vectors length. For example Vectors (10,10,0) length is 14.14. It's the distance from 0,0,0 to 10,10,0.
    If you want to find out the distance from object A to B, you take the position vectors from those objects. Subtract A's position from B, and you get the vector A to B. Get its length and you get the distance from A to B. You can reverse the subtraction. Then the distance is the same but the vector is from B to A.
    hmm i still dont get it, sorry. you mean the length is like the plane distance from the distance operator? whats the difference?
    0.0.0 to 10.10.0 = 14.14 ??
    Share this post

  7. #7
    Zorsselsson's Avatar Member
    Join Date
    Jan 2013
    Location
    Stockholm
    Posts
    57
    Originally Posted by Core2TOM Go to original post
    hmm i still dont get it, sorry. you mean the length is like the plane distance from the distance operator? whats the difference?
    0.0.0 to 10.10.0 = 14.14 ??
    So you dont understand what a vector is? Here's a good explanation http://www.mathsisfun.com/algebra/vectors.html

    The difference between length and the distance operator is that you use the other to directly measure distances between blocks, and the other to tell you a vectors length from a vector block.
    Share this post

  8. #8
    Magnus2552's Avatar Junior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    18
    Originally Posted by Core2TOM Go to original post
    hmm i still dont get it, sorry. you mean the length is like the plane distance from the distance operator? whats the difference?
    0.0.0 to 10.10.0 = 14.14 ??
    Hey, Tom
    What you want to know, goes deep into mathematics, but since you asked, I will explain it:
    A vector always has a length. Lets start with some basic examples:
    The vector (7,0,0) has a length of 7 (as you clearly can see)
    And the vector (0,0,7) also has a total length of 7.
    But what if there is a vector like (7,5,0).
    Basically, then you use the Pythagorean theorem to determine the vector's length:
    So then the length would be sqrt(72+52)
    In general:




    Furthermore, if you want to calculate the distance between two vectors, you can subtract one vector by the other, and then put the also so called absolute value (in this case another word for the length of the vector, in German you say: „Absolutbetrag“ )on the result, which will end in the exact distance. The length is used in many more calculations, for instance, when calculating the rotation between two vectors. (Though Trials gives you its own rotation difference tool)
    I hope this helps. In fact, I do even hope, that you are interested in this.
    Anyways, maybe you prefer the wikipedia article in your mother tongue German: http://de.m.wikipedia.org/wiki/Vekto..._eines_Vektors
    (The link automatically jumps to the correct position, which is relevant for you

    Greetings, Magnus

    (I did not know that you were interested in mathematics by the way xD )
    Anyways, here another graphic to visualizise the whole thing:

    (Its only 2D vectors, but basically it is the same )
    Share this post

  9. #9
    Core2TOM's Avatar Senior Member
    Join Date
    Mar 2014
    Location
    Germany
    Posts
    506
    yo hey magnus nice to see you here.

    hmm lets say my interrest depends on if i can handle it, but i guess this is too much math for me... so if you could upload a video and show me a little example what i can do with vector lenght in the editor, this would be really helpful for me and many other people. thanks!
    Share this post

  10. #10
    Magnus2552's Avatar Junior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    18
    Originally Posted by Core2TOM Go to original post
    so if you could upload a video and show me a little example what i can do with vector lenght in the editor, this would be really helpful for me and many other people. thanks!
    Well, thats easy said

    As Megamanne mentioned above, these sort of complicated mathematical evaluations only become handy in quite complex game mechanics:
    These are very useful, but only for advanced stuff. For example you want to make your own game with new tricky game mechanics or an advanced AI for example for an FPS game.
    In fact, I also cannot show an obvious example for this at the moment, since the most common use of the length/vector absolute value operator is directly integrated into the Trials Editor! It is the distance operator. Another use of it is also easier to achieve - using other Editor tools (When wanting to get the rotation difference between two objects).
    Therefore, I cannot state a neat example for the length operator, but it could get handy in some more complex algorithms regarding movement AI
    Share this post