Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / View Snippet (1st, 2nd and 3rd) Using Limbs

Author
Message
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 18th Apr 2005 02:56 Edited at: 12th May 2005 05:58
View Snippet
By RUCCUS


<UPDATE> See the 4TH Post for an update on the 1st person view, this one still works but the one in Post 4 is easier to incorperate and involves less lag...I think.
</UPDATE>

Pretty self explanatory, basically a limb is added behind the object, hidden and the camera is located at that limb. Then the camera points to the main object. Thus 3rd person view (explaining 3rd since it seems to be the most common problem). If you need any help just ask.

Haven't seen it done like this before so just giving another idea out to the community.



- RUCCUS

ALPHA ZERO PRODUCTIONS
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: Mom ! I forgot where we live !
Posted: 7th May 2005 09:41
its kinda cool.

RiiDii
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 7th May 2005 12:59
Nice! I definately will be using this concept!

I see a lot of extra stuff I suspect is mainly for the tutorial aspect of the code, but I do see something you might want to change: There is no need to create 3 seperate dummy limb objects. Just create the object and the mesh. Then delete the object. The mesh will stick around until you delete it. There is no problem using the same mesh multiple times (unless you want it there to clarify the different limbs a little more, for the tutorial's sake ). Also, here's a few options to help reduce poly count.

Instead of the limbs being boxes, try:
Make Object Sphere 5000,.1,1,1
This is a 2 polygon object. Or try:
Make Object Triangle 5000,0,0,0,0,.1,0,0,0,0
Which is a 1 polygon object. Cubes are 12 polygons (2 per side).

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 12th May 2005 05:49 Edited at: 12th May 2005 05:56
Thanks Riidii for the advice, yeah when I read over it a while later I realised it had some extra things but I didnt worry it didnt lag it up too much. That sphere instead og box thing is a good ida though, I never thought spheres had a smaller polly count than boxes.

Also, Im not sure but I think I have an un-needed limb in their, maybe not

Thanks again, to you to AZP

<EDIT>

I just realised something. Instead of pointing the camera at a limb for 1st Person View, you can just point the camera at the object's x, y, and z coordinates, and position it there as well. Something like this:



That should work. Actually Im sure it will work. As far as rotating the camera accordingly just rotate the camera exactly the same as you rotate the object when you use the left and right key, except switch object to camera and take out the "1" since the default camera is 0. This is off the top of my head but I think this would work:



RiiDii
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 13th May 2005 00:27
Just use Set Camera to Object Orientation.
As I was trying to modify your code to fit some things I would use it for, I was trying to figure out how to do the same exact thing. Good catch Ruccus!

Also, spheres normally have a ton of poly's, but when you specify 1 row and 1 column, they only have 2 poly's. Heck, even this will work:

Make Object Sphere 1,1,0,0

I have no idea how many poly's it has, but I do know that it's unstable and can crash.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 14th May 2005 06:19
I used the limbs because when I was a little newer to DBP I tried using Set Object To Orienation and Set Object To Follow and the problem was it never stayed right behind the object, for starters I couldn't even get the orientation one to work...don't know why, and the following one worked, but would never stick right behind the user like I wanted.

Either way, glad it helped someone!

RiiDii
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 14th May 2005 11:52
Oh sorry. S.O.T.O.O. was meant just for the first-person view. Yeah - it wouldn't work well for 2nd person, and maybe not 3rd person too.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Login to post a reply

Server time is: 2025-05-16 15:06:05
Your offset time is: 2025-05-16 15:06:05