Spawn location of assetbundle

StardustVR

Active member
Messages
56
Reactions
107
Points
33
Hi. I've created a few scenes in Unity (correct version) and they import to VAM fine and look fine (most of them, anyways) but how do I make sure it always spawns at the same spot when I open it as a CUA? Say, in the living room or front porch, or wherever? I set the model to 0,0,0 in Unity - but how do I know exactly where 0,0,0 is in my scene? Hope that makes sense. I have a few I'd like to share here, but trying to iron a few wrinkles out first. Thank you!
 
The main spawn in Vam for person atoms or cua's is 0,0,0. You could either open your CUA in vam, move it to the position you want and save subscenes for different rooms.

or, you could save multiple prefabs of the same model for different positions in unity and pack them all in the bundle.
 
The main spawn in Vam for person atoms or cua's is 0,0,0. You could either open your CUA in vam, move it to the position you want and save subscenes for different rooms.

or, you could save multiple prefabs of the same model for different positions in unity and pack them all in the bundle.

Interesting idea. Thanks for that. I actually kinda got the first issue solved - it was just a matter of setting my camera view exactly where I wanted it in Unity - then build the prefab. After than, when I imported and loaded into a Vam scene it placed me where I wanted to be. Still tweaking. But the multiple prefabs and subscenes are good ideas. I'm also creating a scene so users can select the scene or the asset. Thanks again! This is fun, but way too addictive.
 
Well I thought I had it figured out. Still not right. So right now when I build a new scene and import a random asset someone created (say, room.assetbundle) and then spawn a person she spawns right in the middle of the room, generally. Mine spawns across the street. lol. Granted in my scene it's no problem, I can move my room where I want. Just trying to figure out how to make the asset (room) spawn where I want when I add it to a scene. Or is that scene specific?
 
Remember that when you drag an object into the scene in unity to make a prefab it's position doesn't set to 0,0,0, it stays where you drop it. You can set it on the right hand side menu somewhere. It may be useful to add a small scene object at the zero point in unity as a reference for placement and scale.

Every time you add a custom unity asset atom in vam it should default to the spawn point.
 
I alway put a sphere at 0,0,0 in unity and adjust the scene before i make the prefab
 
I alway put a sphere at 0,0,0 in unity and adjust the scene before i make the prefab

Man - I *think* that's what I'm doing. So I create my actual model in Sketchup (usually) and then export to fbx. I import that to Unity, drag into my scene, then change the position of the model to 0,0,0 and drag that back into my assets window and build the assetbundle from that. That copies to VAM assets, into my scene via CUA and when I import any atom it's nowhere near the inside of the house. So this last time I tried something different. In Unity, after setting the model to 0,0,0 I added a cube, which was still outside my house. So I moved the house until the cube was exactly where I'd want my atoms to spawn. I made the prefab, built the assetbundle and imported to VAM. Again - I added an atom that was well outside the house. Ugh! I'm sure I'm just doing something wrong. I'll watch a few videos tomorrow and se if I can figure out what it is. I appreciate y'all's help.
 

That worked! Thanks again. Only thing I still need to do is get collisions correct. So what's the typical way to do this - this is actually an entire house, with multiple beds, couches, etc. Should I simply apply a collider to the entire house? I saw another post where you created a video, like the one above, to help someone with a person to person collision. Can I use that same info with this house asset?
 
That worked! Thanks again. Only thing I still need to do is get collisions correct. So what's the typical way to do this - this is actually an entire house, with multiple beds, couches, etc. Should I simply apply a collider to the entire house? I saw another post where you created a video, like the one above, to help someone with a person to person collision. Can I use that same info with this house asset?
Depends on how it was ported, it should be able to do just the entire house.
 
Back
Top Bottom