ADM Posted March 26, 2019 Share Posted March 26, 2019 Hi everyone, I'm currently struggling to find a solution to my problem : The title I don't think there is a way to directly spawn something at the center of a tile on the world gen (if it is well it'll be awesome) So I at least try to make a function for the prefab to teleport it to its current tile center I've tried and my result is somehow... Yeah Wilson, you're right. Also, I don't want to use layout/static_layout for the spawn of those for reasonable reasons Thanks a lot for the help... I mean, I can't find this my myself ^^ Just a quick reminder if it help, the worldgen spawn only a single prefab for each tile so that's why I need to teleport the prefab to its own tile Link to comment https://forums.kleientertainment.com/forums/topic/104190-hacky-way-to-spawnteleport-prefab-at-center-of-tile/ Share on other sites More sharing options...
ADM Posted March 26, 2019 Author Share Posted March 26, 2019 Welp no matter, I finder out something useful and it worked, thanks anyway if someone tried a solution local cx, cy, cz = map:GetTileCenterPoint(x, 0, z) inst.Physics:Teleport(cx, 0, cz) Link to comment https://forums.kleientertainment.com/forums/topic/104190-hacky-way-to-spawnteleport-prefab-at-center-of-tile/#findComment-1169622 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now