smashthewindow Posted August 26, 2011 Share Posted August 26, 2011 I'm right now I'm creating a third-person camera. I'm nearly done, I've used one from the ball game example and added a few interpolation & controller movement functions to make it look smoother. I have a few quesiton regarding TPS Cam. 1) In the wiki, it says C++: bool Draw::GetPick( Pick& pick, const TVec3& point1, const TVec3& point2, flt radius = 0 , const CollisionType& type = 0, *Byte filter = 0 ) const However, I'm pretty sure this is wrong or outdated. (Draw class doesn't have GetPick() func.) Can anyone tell me the correct prototype func for GetPick() or the C++ equivalent? I just don't want to rely on C function LinePick(), it looks messy. 2) I'm using a pivot as a parent to my camera to set the cam's rotation and so. (Only my GetMain().GetCamera() entity.) I saw a thread which says this will cause problems, and I need to rotate Transparency & Background layer's cameras too. (Not sure... ; Can anyone advise me on this? Thanks. Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
Roland Posted August 26, 2011 Share Posted August 26, 2011 Maybe Camera::GetPick is what you are looking for (leoCamera.h) Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
smashthewindow Posted August 26, 2011 Author Share Posted August 26, 2011 Maybe Camera::GetPick is what you are looking for (leoCamera.h) Hmm, the problem is that it runs the ray test from the camera. I need to run it from an controller entity. I know that in this case I can probably use the entity's IsVisible() function, but I'm looking for more a general solution - I'm trying to get familiar with Leadwerks. P.S: Vector3::IsVisible( const TVec3& p1, const TVec3& p2, flt radius, int collisionType, Filter filter = 0 ) Vector3 class doesn't even exist... Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
Laurens Posted August 26, 2011 Share Posted August 26, 2011 While I am not familiar with LEO, keep in mind that when you're doing IsVisible between two meshes, you need to hide both meshes prior to testing or the result will always evaluate to false. Quote Link to comment Share on other sites More sharing options...
smashthewindow Posted August 26, 2011 Author Share Posted August 26, 2011 While I am not familiar with LEO, keep in mind that when you're doing IsVisible between two meshes, you need to hide both meshes prior to testing or the result will always evaluate to false. I run a filter function to filter out some of the things it should ignore But thanks for the input. What template do you use? I get a feeling that the LEO template isn't quite finished, and I'm pretty fluent in other language other than BlitzMax, so I might as well change. Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
Canardia Posted August 27, 2011 Share Posted August 27, 2011 Use Entity::GetPick, it works much better than Camera::GetPick, and you can cast it from anywhere to anywhere. LEO is completely finished. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Laurens Posted August 27, 2011 Share Posted August 27, 2011 I run a filter function to filter out some of the things it should ignore But thanks for the input. What template do you use? I get a feeling that the LEO template isn't quite finished, and I'm pretty fluent in other language other than BlitzMax, so I might as well change. I am not using LEO, I very much prefer the C-API. It never gets in the way Quote Link to comment Share on other sites More sharing options...
Roland Posted August 27, 2011 Share Posted August 27, 2011 Yes. Leo is finnished since long time ago. The goal with LEO is to be a thin class wrapper around the C-api. No more and no less. Same thing goes for LE.Net Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
smashthewindow Posted August 28, 2011 Author Share Posted August 28, 2011 Yes. Leo is finnished since long time ago. The goal with LEO is to be a thin class wrapper around the C-api. No more and no less. Same thing goes for LE.Net Ah, I see. I came from a Source engine modding background, and was quite surprised when I saw that the structures was a lot different. I'm a nearly noobie in game programming, so it would have been nice if the wiki showed some theories or concepts of how people set up/integrate their entity structures though. Quote Blog & Portfolio Current project: moon.chase.star Link to comment Share on other sites More sharing options...
smashthewindow Posted August 28, 2011 Author Share Posted August 28, 2011 it would have been nice if the wiki showed some theories or concepts of how people set up/integrate their entity structures though. Actually nevermind. I found this amazing library called GameLib that kinds of shows you how to do all the basic stuff. I should probably be looking into that closer now. Quote Blog & Portfolio Current project: moon.chase.star 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.