Facing objects?

  • #10, by nebirviMonday, 19. February 2018, 15:04 6 years ago
    I hope you can see everything. What is the problem? :/

    Newbie

    30 Posts


  • #11, by afrlmeMonday, 19. February 2018, 15:19 6 years ago
    You haven't assigned an alignment or position in the properties tab, hence the default position being 0,0 which is the top left corner of the scene.

    The interaction position is where the character should walk to before interacting with the scene object, but it's also the position where immediate type executions will align to. Just remember that the alignment is based on 2 points; the characters animation center position (usually near the characters feet) & the position you set in the properties tab for each of the scene objects.

    Imperator

    7278 Posts

  • #12, by esmeraldaMonday, 19. February 2018, 15:20 6 years ago
    Jep, you deleted the object position. But the engine needs the objects postion to align the character. The character turns to this position (not the image itself). So if there is no position defined, the character turns randomly.
    Just put in a position like you did right at the beginning when you wanted the character to walk there. 

    edit: as AFRLme says :-)

    Key Killer

    513 Posts

  • #13, by nebirviMonday, 19. February 2018, 20:22 6 years ago
    Okay, I put the values on the box object in there again, but she refuses to turn other than sideways... I know there are better examples for this than these boxes, but I was hoping to be ably to aply this on the table in the scene later (or other objects that can be reached from many angles...)

    Newbie

    30 Posts

  • #14, by esmeraldaTuesday, 20. February 2018, 08:38 6 years ago
    The angle should change if you move your character more to the middle of the room.

    As ARFLme said, the angle is calculated by the objects position and the animation center of your character (normaly around the feet of the character). I guess the engine picks that direction of your character (of the 4 or 8 or how many you have) that is closest to that angle. It is not super accurate though. (at least that is my impression)

    You don't need to put an anlingment in the compass-thingy, but it wouldn't change anything if you did. It is only needed when commands are executed at destination.

    Edit: if you are not planing to use the obejcts position of this object as an interaction point when using a command at destination, you can put it anywhere you like. It doesnt even have to be in the way system. So you can tweek the outcome of the alignement-calculation a bit. For example you could place the objects positon between the two boxes.
    Then, when you want to walk to the boxes, use immediate execution of your command and use the action part "send character to position" x/y.

    Key Killer

    513 Posts

  • #15, by nebirviTuesday, 20. February 2018, 10:10 6 years ago
    Yes now it works fine! Just had to tweak the position a little smile Thanks All!

    Newbie

    30 Posts

  • #16, by afrlmeTuesday, 20. February 2018, 12:34 6 years ago
    To get really accurate alignment you need to use Lua script & a bunch of math calculations. I tried sorting out accurate alignment myself for a game I'm working on & in the end I just gave up on it as it started giving me a nasty headache. Problem is trying to determine if the alignment should take place from the characters feet or head which is dependent on the character position in a scene & also the perspective of the scene.

    Imperator

    7278 Posts