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.

Newcomers DBPro Corner / hard question,..characters leg up on chair??

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 2nd Aug 2006 04:27 Edited at: 2nd Aug 2006 04:28
hi,i dont know if any of you have played tomb raider legend.but its soo cool!!!

anyway,sometimes when Lara is moving around,& some object is nearby like her left leg,she'll put her left leg up on top of it.this is soo cool!!

how would i even attempt to code something like this??

where my player would do the same thing??

i have no ideas yet.

i can show a picture if needed,to show what i mean.
Gil Galvanti
19
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 2nd Aug 2006 05:56
yeah a picture would be nice. If you just mean when she get's near an object, she bends her knee and puts her foot up on it, I'd guess that you would just detect if that object was close enough and at the right angle to the player, and then play an animation with the right or left foot going up at the closest level of the object.

Pirates of Port Royale
Live the life of a pirate.
Jrock
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Riven
Posted: 2nd Aug 2006 06:25 Edited at: 2nd Aug 2006 06:31
Ya thats how I would do it. I guess you could use a collison command, like


You would have to make animations for this, or you could use the limb commands I guess (I havn't used limbs yet).

Or you could go one step further.
And play a sound when she puts the leg on the object.

I guess that is the simplest way to do it.

Now, its time for sleep.

erm

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 2nd Aug 2006 16:30 Edited at: 2nd Aug 2006 16:31
yeah,i was thinking about using the limb commands.

the way i was thinking of coding it was,my players left shoe would be a seperate object glued to the left foot limb,if object collision between the left shoe & some other object,i would use the limb commands to rotate the thigh & knee to place it ..depending on what object it is.i would also have to have a default height for certain objects to do this with,like chairs & rocks,something a little less higher,smaller rocks, etc.

thanks.
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 2nd Aug 2006 17:44
A good way to start doing this sort of thing, without going the whole way, would be to have your character's feet angle to the floor. I believe the Mario games were some of the first to do this - but it just means you do collision points around the feet (or, if you have the right plugin, get the 'normal' of the surface that theyre colliding with) and angle the feet appropriately.

Using normals would be easiest, but otherwise, you could do a raycheck at the toes and heel of each foot, and work out the angle between them.

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 2nd Aug 2006 18:00 Edited at: 2nd Aug 2006 18:01
can someone tell me what a 'normal' is??
ive only heard this term used here.

also i think i understand what your saying,tinkergirl.do some kind of raycast to get the distance from the foot to the surface of whatever objects touching the foot.

but i think it might be hard after that,how do i tell dbp to only rotate the limb for the thigh & knee only so much as to keep the foot on top of the object?
Jrock
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Riven
Posted: 2nd Aug 2006 18:24
Personally, I think animation is the easiest way to go here.
Quote: "but i think it might be hard after that,how do i tell dbp to only rotate the limb for the thigh & knee only so much as to keep the foot on top of the object? "


You would probably have to use a variable to determine wether the foot & thigh are on the object.

erm

Login to post a reply

Server time is: 2024-09-25 05:33:35
Your offset time is: 2024-09-25 05:33:35