Page 1 of 1
Spawnpoint Issue
Posted: Mon Oct 03, 2022 10:14 am
by will_888
Hello!
I'm using an Invector 3rd Person Controller as a main character.
I'm able to make the character move across scene and spawn at a precise Spawnpoint.
However, before spawning in the right place, the character spawns at 0,0,0. Then, almost immediately (I'd say less than one second) the character is "teleported" to the correct Spawnpoint.
As for my setup, the starting scene has the character, the arrival scene is without that character. The character has a script with a DontDestroyOnLoad method at Awake. I've added the Position Saver to the character.
How can I prevent the character from doing this weird behaviour of spawning at 0,0,0?
Re: Spawnpoint Issue
Posted: Mon Oct 03, 2022 10:26 am
by Tony Li
Hi,
Try setting the Save System component's Frames To Wait Before Apply Data to zero. If that doesn't work, it may be that Invector is forcing it to appear at its design time position before the save system can move it. If that's the case, use a fade out/in scene transition. See the Standard Scene Transition Manager configuration on DemoScene1's Dialogue Manager, or download the SaveSystemPrefabs package from the Dialogue System Extras page and use it.
Re: Spawnpoint Issue
Posted: Mon Oct 03, 2022 12:32 pm
by will_888
Unfortunately, the first suggestion doesn't work. Fade-out transition, though, works good
Thanks!!
Re: Spawnpoint Issue
Posted: Mon Oct 03, 2022 12:43 pm
by Tony Li
Glad to help!
Re: Spawnpoint Issue
Posted: Sat Oct 22, 2022 5:37 pm
by will_888
Hello!
Using the Scene Transition solved the issue, however in some levels the character still takes some time to arrive at the spawnpoint, and the effect is kinda jarring
So, I need to make the Scene Transition longer, but I can't manage to do it
Can you help me with this?
Thanks!
Re: Spawnpoint Issue
Posted: Sat Oct 22, 2022 8:41 pm
by Tony Li
Hi,
Are you using a Standard Scene Transition Manager component? (See DemoScene1's Dialogue Manager for an example configuration, or download the SaveSystemPrefabs package from the Dialogue System Extras page.)
If you're using a Standard Scene Transition Manager, you can configure your own transition or use the SceneFaderCanvas which fades out to black before the scene change and then fades in from black after the scene change. You can change the fade-in animation so it stays black for a short time before fading in. This will give your player and camera (usually it's the Invector camera) time to get into position.
Re: Spawnpoint Issue
Posted: Sun Oct 23, 2022 8:57 am
by will_888
Yes I'm using the Standard Scene Transition
I'm still having trouble, though.
>You can change the fade-in animation
Do I need to change the Speed of the clip on the Animator?
And what's the clip for the fade-in called? Show? Or Hide? I'm changing the values on that too but I still don't get the desired result.
Also, the component on Dialogue Manager called Standard Scene Transition Manager has two values called Animation Duration and Min Transition Duration (for leaving the scene and entering the scene), how do they work? Do they override the Animator?
Also, I'm unchecking Pause During Transition because I expect the Invector Controller to do its thing while the transition works, however, I can't manage to get a smooth transition
Thank you so much as always for the invaluable support
)
Re: Spawnpoint Issue
Posted: Sun Oct 23, 2022 11:21 am
by Tony Li
Hi,
> Do I need to change the Speed of the clip on the Animator?
I recommend changing the animation clip itself, not the speed at which the animator plays the animation clip. Duplicate the clip and use your duplicate, not the original. This way you won't lose your customizations when you update the Dialogue System.
Here's an example where I've edited the animation clip to stay black for the first half of its run (0.00 seconds to 0.25 seconds). Then it fades in (0.25 seconds to 0.50 seconds).
- dopesheet.png (16.55 KiB) Viewed 739 times
If you prefer the Curves view:
- curves.png (16.96 KiB) Viewed 739 times
> And what's the clip for the fade-in called? Show? Or Hide?
It's a little unintuitive. The SceneFaderCanvas has a black cover. The "Show" trigger shows the black cover -- in other words, it fades out the scene.
> Also, the component on Dialogue Manager called Standard Scene Transition Manager has two values called Animation Duration and Min Transition Duration (for leaving the scene and entering the scene), how do they work? Do they override the Animator?
They don't override the Animator.
I just wrote up the order of events here:
Scene Transition Manager Order of Events