Page 2 of 2
Re: Spawning USurvival Items
Posted: Wed Mar 20, 2019 6:42 pm
by Tony Li
Hi Nathan,
I have a suspicion that using Variable["QUESTGIVERID"] will work. If not, let me know.
Re: Spawning USurvival Items
Posted: Wed Mar 20, 2019 7:22 pm
by nathanj
You were correct. I should have thought of trying that. Everything is working now
Thanks Tony!
Re: Spawning USurvival Items
Posted: Wed Mar 20, 2019 7:23 pm
by Tony Li
Always glad to help!
Re: Spawning USurvival Items
Posted: Wed Mar 20, 2019 7:33 pm
by nathanj
That was the first time I'd used the global search and replace!!!
Such an awesome feature.
Nathan
Re: Spawning USurvival Items
Posted: Fri Mar 29, 2019 3:52 pm
by Tony Li
Nathan,
Please give this network-aware spawner a try:
QM_MirrorSpawner_2019-03-29.unitypackage
Replace your Spawner component with ServerSpawner. It will automatically add a helper component named ServerSpawnerHelper.
Re: Spawning USurvival Items
Posted: Sun Mar 31, 2019 11:50 pm
by nathanj
Hi Tony
Sorry for the delay.
Just tested this and the good news is it generates items that can be collected! However, I'm struggling with how to get the spanwed items to fall or snap to the terrain - it works on a flat terrain but as soon as there's height variance it becomes problematic. If I add a Rigidbody to the collectable item it falls through the terrain - I've tested all the physics settings and there's no reason for this behaviour. Is it possible that there is an issue between the client and the server registering the Rigidbody object.
I'm not even sure a Rigidbody is the solution here. Would there be a way to implement a raycast detection of the terrain to snap the item when it is generated? Or, am I at this point moving into too niche of usage? We could implement on our end but if it's not too difficult might not be a bad feature of the spawner.
I hope this helps and thanks again for this!
Nathan
Re: Spawning USurvival Items
Posted: Mon Apr 01, 2019 9:14 am
by Tony Li
Hi Nathan,
Make sure it has a collider that's not a trigger, and that it's on a layer that collides with world geometry. I'm not sure how this will play with ItemDrop detection, though. You may need a custom ItemDrop script. For example:
- Parent object: Layer:Default, Box Collider (not trigger), Rigidbody,
- Child object: Layer:ItemDrop, Box Collider, custom ItemDrop script that destroys the parent object.
Re: Spawning USurvival Items
Posted: Mon Apr 01, 2019 8:07 pm
by nathanj
:facepalm:
The box collider was set to “is trigger”. I’m sorry for wasting your time again.
Nathan
Re: Spawning USurvival Items
Posted: Mon Apr 01, 2019 8:35 pm
by Tony Li
No worries! Glad it's working now.