trouble with MoveTo() and Invector?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
LeonSA
Posts: 5
Joined: Sat Sep 03, 2022 7:30 pm

trouble with MoveTo() and Invector?

Post by LeonSA »

hi! I've followed all the steps for the invector integration, and it seems to be working well. I'm running into a persistent problem tho: When I try to teleport my player using MoveTo(), the player seems to appear in random locations, possibly because of rigidbody, but I can't say for sure because it's happening regardless of gravity or sleep/wake options. Basically i haven't found any way to move my player during cutscenes.

thanks!
User avatar
Tony Li
Posts: 22143
Joined: Thu Jul 18, 2013 1:27 pm

Re: trouble with MoveTo() and Invector?

Post by Tony Li »

Hi,

Invector also controls the player's position, so it will interfere with MoveTo(). You can write a custom sequencer command that uses similar code to the InvectorPositionSaver script. That code would be something like:

Code: Select all

var smooth = vThirdPersonCamera.instance.currentState.smooth;
var smoothDamp = vThirdPersonCamera.instance.currentState.smoothDamp;
vThirdPersonCamera.instance.currentState.smooth = 0;
vThirdPersonCamera.instance.currentState.smoothDamp = 0;
subject.SetPositionAndRotation(desiredPosition, desiredRotation);
Post Reply