Jump to content

TPS Cam


smashthewindow
 Share

Recommended Posts

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... :o;:) Can anyone advise me on this?

 

Thanks.

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

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

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

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.

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

Use Entity::GetPick, it works much better than Camera::GetPick, and you can cast it from anywhere to anywhere.

LEO is completely finished.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

I run a filter function to filter out some of the things it should ignore :o 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 :)

Link to comment
Share on other sites

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.

Blog & Portfolio

 

Current project: moon.chase.star

Link to comment
Share on other sites

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.

Blog & Portfolio

 

Current project: moon.chase.star

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