Yue Posted July 21, 2017 Share Posted July 21, 2017 Hi, I have one drawback. From a script hooked to an entity, in the update function, I want to position another entity in the same position. I guess I have to use GetPosition, but I have not the slightest idea. Any suggestions? Entity Camera. Entity Ball. GetPosition camera on ball. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted July 21, 2017 Share Posted July 21, 2017 So you have entity A and entity B. You want to place entity B at the position of A right? In a script attached to entity B, make sure you get a reference to entity A. This can be done in numerous ways. One way is by linking it: Once you have a reference to entity A inside the script that is attached on entity B do something like: --on entity B self.entity:SetPosition(self.entityA:GetPosition(true)) 1 Quote Link to comment Share on other sites More sharing options...
Yue Posted July 21, 2017 Author Share Posted July 21, 2017 Thanks!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.