Forum rules - please read before posting.

Following NPC causes player 'jump' when under Direct Control mode

edited January 18 in Technical Q&A

Hello! I'm running some tests with direct control (gamepad/ keyboard) instead of pure mouse point and click. It's all implemented and working nicely.

However, if I have an NPC following the character, when I stop, the player 'jumps' position when the NPC starts their movement.

If I remove the NPC, or I stay within range of the NPC there's no jump. The NPC has no child objects, and just a rigidbody (no colliders). There's a slight pause after the jump, which I think is just the NPC 'turn to face before moving' resolving?

I can't work out what's causing this. Any ideas?

https://imgur.com/HixVdS0
(red rectangle is player, white circle is following NPC)

Any help would be much appreciated! -D

Comments

  • What are your AC and Unity versions?

    Hard to say what it might be from the video - is it a spike in the Profiler? If so, try switching your scene's Pathfinding method to A Star 2D - it's a faster alternative to the default Polygon Collider option.

    Otherwise, probably best for me to see for myself. If you can create a .unitypackage of your Managers, the character prefabs, and the test scene, PM it to me and I'll take a look.

  • Thanks, I'll hook something up later. I don't think it's a spike, it feels like the character is being forced out (as if two colliders are embedded). I'll check the pathfinding, see what that does.

  • Yep, switching to Astar pathfinding worked a treat, all fixed. Thanks Chris!

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.