Jump to content

GetPosition??


Yue
 Share

Recommended Posts

 

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.

 

 

 

 

Link to comment
Share on other sites

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))

 

  • Upvote 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...