Forum rules - please read before posting.

'Returning after overshooting now' flag?

Hi there,

I have some problems with the 'overshooting' effect that you experiment when the deceleration value is not enough to prevent it from happening.

I'm using Spine for animation and I have automatic code in place that changes the player's facing when the player gameobject transform is moving. Therefore, when it overshoots and returns to the target point, the player changes its facing. This happens a lot when reaching a cutscene trigger in which I tell the player to stop (every one of them, in fact).

So, I think I have three approaches to solve this problem...

1. Augment deceleration to a much higher value that stops the player suddenly.

It works at the cost of animation smoothness. The character stopping on her tracks like if she hit a wall looks REAL bad.

2. Delve into the API to write a custom controller that relies on AC to manage the player's facing.

I'd prefer to avoid this because my current code is working fine with the exception of this problem. I also don't know if when overshooting AC tells that character to briefly change direction as well... (?)

3. Check if some kind of internal "I'm returning to the final target after overshooting" boolean flag is active or not, so I could use it to prevent a facing switch in those instances.

This would be the less intrusive method right now. So my two questions would obviously be...:

Does it even exist?

If not, would you implement it in the next version?

Thank you for your time!

Comments

  • edited August 2017
    If by overshooting, you're referring to the effects of the Attempt to be super-accurate? setting, then that should only affect position - not rotation.

    I need to more fully understand the issue before I can consider implementing anything.

    Could you explain in more detail what's going on, exactly?  If you have custom code that is overriding the player's transform, that will interfere with AC's own character code.  You should first verify / provide steps to recreate the problem with a standard AC character - i.e. one that has no other asset/code attached.

    If this is an issue that only occurs as a result of the custom code, we can look at an alternative approach.  Please explain the purpose / need for the custom code in more detail.  A video or series of screenshots would help a lot to understand the problem.

    What are your movement settings, both in the Settings Manager and the Character's Inspector?  Please provide screenshots of both.
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.