Forum rules - please read before posting.

Walk-to-marker accuracy

edited June 2019 in Engine development

I'm trying to achieve a reliable, precise result when moving my player character to Hotspot markers, but I can't get it to work.

I need the player to be at an exact spot, for the player interaction animation to match the object animation - fx. Player grabbing a door handle and opening door. I have the animations lined up in my 3D animation software, and place a marker on the same exact spot in Unity. In Unity the animations rarely line up, because of the small differences in Player position.

My movement method is "Straight To Cursor" - and interactions by single clicking on Hotspots in close vicinity. My Player is moved by root-motion.

I've tried all "Destination accuracy" settings - all seems not precise or consistent enough - also tried the super-accurate feature (which in the "Char" script seems to Disable super-accurate mode) by tweeking the Char script to make it work, but this often make the Player position bug-out or rotate slowly for a long time before hitting mark.

Is it in anyway possible to be so super accurate with Adventure Creator's movement? :)
Or perhaps recommendations of a third-party movement controller similar to "Straight To Cursor" compatible with AC.

AC version 1.68.1

Thanks!

Comments

  • Welcome to the community, @jchx.

    Getting a character to reach a precise position smoothly is a bit of a task in any project - AC or not. Difficulty is also compounded considerably when root motion is involved.

    The Manual's "Precision movement" chapter covers the various options available so far as AC goes.

    However, in my experience, the best way to use both root motion and precision for e.g. opening doors is to rely on Timeline. With Timeline, you can set a character's exact position - and then smoothly transition to that by setting an "Ease In". If the character is already close to this point, and the animation plays at the same time, the effect can be quite seamless.

  • Thanks Chris!

    Yeah I figured it wasn't an easy fix, but I'll will look into Timeline, and try the suggestions in the manual.

    Thanks for all your hard work - AC is such a great tool :)

  • I'm experiencing the same thing for a long time now and always try to tweak the values here and there. I also did some thinking about it. Maybe it would be a solution to end a walk-to-marker command with a simple "set transform" to the marker coordinates if the character is in a certain range to the marker. This would more or less have the drawback that there would be a little jump at the end of the walk animation, but could be better than have the character standing on the wrong spot when animating.
    I did it at some occasions in the game and mask it by changing the camera in the moment the "jump" occurs, but maybe it would be a nice idea to have a checkbox like "Jump to marker at end of walking" or something on the AC side. It could be in the inspector of a hotspot when using "Walk to marker" so that the behaviour is not present in the whole game and also in the "Walk to marker" action.

  • end a walk-to-marker command with a simple "set transform" to the marker coordinates if the character is in a certain range to the marker

    That's essentially what the Attempt to be super accurate? option does already.

    One other possible option would be to attach a Moveable component to the character, and use that to lerp them to the target Marker once they've reached the it. Try it first with a separate Object: Transform Action - if it's succesful, it's feasible it could be done programatically via the OnCharacterEndPath custom event.

  • In our project we use unity navigation, and it has a super accurate setting. Setting it to true, causes the character to turn corners very slowly. So we use additional script and set it to true only when there is only one node remaining in the path. Results are pretty good

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.