. . . Posted November 25, 2016 Share Posted November 25, 2016 (edited) Hello, I have a problem I don't know how to fix. If someone can help me that'd be great ! So, the problem is sometimes when I spawn my fx with SetParent it makes the fx spawn behind my player which's very ugly.. So, I want to make it that it spawns following my player with SetParent but with y+0.1 then it always covers my player & doesn't sometimes glitch! I tried doing something like this but nothing happened? Does anyone know if this's possible to do ? local fx = SpawnPrefab("spawn_fx_medium") local x, y, z = act.target.Transform:GetWorldPosition() if fx ~= nil then --fx.Transform:SetPosition(x, y+0.1, z) fx.entity:SetParent(act.target.entity, y+0.1) end I would really appreciate any kind of help, thanks so much for reading my problem & have a wonderful day/night !!! Edited November 27, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/71998-solved-fxentitysetparent-problem/ Share on other sites More sharing options...
. . . Posted November 26, 2016 Author Share Posted November 26, 2016 Is there no way to change the position of fx when using " fx.entity:SetParent(inst.entity) "? Link to comment https://forums.kleientertainment.com/forums/topic/71998-solved-fxentitysetparent-problem/#findComment-842137 Share on other sites More sharing options...
eZeth Posted November 26, 2016 Share Posted November 26, 2016 I have very little understanding of DST modding but I think I can manage coordination. According to what I understand about coordinates, simply adding '+0.1' won't cut it. You need to take into account the orientation of the camera. Link to comment https://forums.kleientertainment.com/forums/topic/71998-solved-fxentitysetparent-problem/#findComment-842142 Share on other sites More sharing options...
. . . Posted November 27, 2016 Author Share Posted November 27, 2016 (edited) I think this fixed my problem, hopefully. So, hopefully no more help needed on this . local fx = SpawnPrefab("spawn_fx_medium") if fx ~= nil then fx.entity:SetParent(act.target.entity) fx.entity:AddFollower() fx.Follower:FollowSymbol(act.target.GUID, "torso", 0, 0, 0) end Edited November 27, 2016 by SuperDavid Link to comment https://forums.kleientertainment.com/forums/topic/71998-solved-fxentitysetparent-problem/#findComment-842221 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