Forum rules - please read before posting.

Move 3D Player to the Exact marker where NPC is placed

edited December 2023 in Technical Q&A

In 3D direct, I have a scene in which my player will go in front of a mirror.
The player is going to talk with her reflection in the mirror . Now I use mirror hotspot walk to marker for player to walk on a Marker which transform(World Placement) is as of NPC(copy of player on a "Fake" layer)
But i see that the player avoids going through the npc even though i placed in in a newly made layer and made collider off and removed rigidbody. (since i do not need the FakeNPC to move except to talk and argue on place. but in normal layers i need the Player to be able to end walk to marker Exactly at the FakeNPC marker.

Let me also note, I tried in Project Setting Physics To uncheck Fake Layer colision with Defaul and IgnorRaycast and Navmesh Layers. but i see no change.

Hope i could make my point clear!

Comments

  • I understand the use of an NPC for use as a "fake" reflection of the Player, but I'm not following how they'd be in the same position - wouldn't the NPC be on the other side of the mirror?

    This is a visual issue, so any screenshots you can share to clarify the situation will help. Also, what physics/movement components are on the Player?

    If the NPC is only used for this situation, you may be able to get rid of their physics components entirely.

  • edited December 2023

    I recorder a Video and uploaded it here
    but while uploading i thought lets put the marker alittle bit passing the NPC maybe the player stops walking before reaching the marker even though my deceleration value is 10 and I checked that extra pathfinding accuracy option in Settings.
    But i did not noticed that in other scenes such things happening. or maybe it is because it is only here that i can reach that level of accurate placing....
    I fear putting the marker in a experimental place since if the player starts from another point then it stops relatively with another angle in another point on that other temporary path.
    so maybe i just need to know how i can have player end its movement exactly on the marker position. I previously have read and see many forum and tutorials about these and was thinking i have done it all right since all through the game i did not noticed this one step gap or maybe it does not existed!! too much thoughts sorry.

  • Thanks for the details, I'm more clear now.

    As you fade out before the close-up, you could use the Object: Teleport Action to snap the Player to the Marker if need be - that will place them at the exact position.

    Going by the size of your Markers, though, it looks like your scene is using a very small scale - which would account for the movement inaccuracy. I'd expect you'd still have the same issue even if the NPC were removed.

    The movement calculations assume a scale comparable with that of Unity standard - i.e. 1 unit roughly being 1 metre. If your other scenes don't have this issue, are they larger in size than this one? Scaling up the scene and characters will improve the accuracy in this scene, certainly.

    Alternatively, you could try checking Retro-style movement? in the Player's Inspector - which should raise the accuracy further at this lower scale, though it will affect regular movement as well.

  • Thank you For your time and useful advices. I have read that scale is important but it is the first time i am noticing its impact. thanks for the insight. Going to scale the scene.
    I used Fade out/in just to hide that mis position. other wise my game is more using Camera Smooth Switch and I try to avoid using Fade transitions.

    I Wish You and all AC community a great new year.

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.