Slastraf Posted February 12, 2019 Share Posted February 12, 2019 What would be the best way to make a raycast between two points visible ? It is needed for a mechanic inside the game (no debug DrawLine) local selfpos = self.entity:GetPosition(true) sprite:SetPosition(selfpos+(other:GetPosition(true)-selfpos)*Vec3(0.5, 0.5, 0.5)) So far I came up with this. In this case other is an entity at the second point. It will place an object in the middle of the two Points. The question is how I rotate the model (plane) that it looks toward the Camera without many lines of code, and be reasonable efficient ? And then how do I scale it so that it will have its edges at each point ? Quote Link to comment Share on other sites More sharing options...
Slastraf Posted February 12, 2019 Author Share Posted February 12, 2019 I found this which could possibly help, but did not test it yet: Update: I added a post there, with my edition of the script. 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.