Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, TraderTom, Akow), 1,388 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Humans, the physical entities #24247
03/17/04 01:09
03/17/04 01:09
Joined: Mar 2002
Posts: 60
São Paulo, Brazil
L
Lord Alexion Offline OP
Junior Member
Lord Alexion  Offline OP
Junior Member
L

Joined: Mar 2002
Posts: 60
São Paulo, Brazil
OK, here I am with another issue... remember I finished my last thread in this forum telling I would use the physics engine to handle character movement? well, now that I'm about to to it, I realized I don't quite know how to achieve that kind of effect... so, does anyone out there know any resources, tutorials, or can offer a quick crash course in how to use the physics engine to achieve a natural-looking walking/jumping motion?

thanks in advance ^^

Re: Humans, the physical entities [Re: Lord Alexion] #24248
03/17/04 02:14
03/17/04 02:14
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

so, does anyone out there know any resources, tutorials, or can offer a quick crash course in how to use the physics engine to achieve a natural-looking walking/jumping motion?




eeeek...as limited as the current implementations of the 3DGS PE are, I don't know of any such papers that are 3DGS specific.

I use the PE for my characters movement and it's nothing fancier than making sure you have friction set to around 20 (so your entity doesn't shoot out an go unstable) and just apply a force or torque to your entities center.

Add a little walking animation (the PE system is separate from any animation code) and my walking player moves and looks fine.

Re: Humans, the physical entities [Re: fastlane69] #24249
03/17/04 02:18
03/17/04 02:18
Joined: Mar 2002
Posts: 60
São Paulo, Brazil
L
Lord Alexion Offline OP
Junior Member
Lord Alexion  Offline OP
Junior Member
L

Joined: Mar 2002
Posts: 60
São Paulo, Brazil
Ooo, I see... but, well, forgive my physics ignorance on that remark here, but how should the foce be applied? I mean, is it constant while the char is walking? and what about jumping? and how can I make the char stop moving at a specific position?

Re: Humans, the physical entities [Re: Lord Alexion] #24250
03/17/04 04:07
03/17/04 04:07
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
use phent_addlocalforce with a nullvector as to where to apply the force.

Depending on your friction, your force may not be enough to move you and when you move it may keep you at const. Velocity. With no friction, you would continue to gain velocity as long as you continued appling a force.

To stop, simply increase the Drag dramatically...I've found this to be a good way to stop a physics ent.

Finally, to jump, use the same phent_addforcelocal, but with a vector like (10,0,100), which tells it to apply a force forwards and up, a jump!

Re: Humans, the physical entities [Re: fastlane69] #24251
03/17/04 04:10
03/17/04 04:10
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
how do you handle stairs? do you use a box or a sphere? ...i haven't tried to use physics for humanoid players yet but i would make the player physics entity float a certain distance above the ground.

Re: Humans, the physical entities [Re: ventilator] #24252
03/17/04 04:34
03/17/04 04:34
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
If registed with the PE, having your entity hover above the ground is very likely to lead to undesired results since you would have to apply a constant upwards force to counter gravity....very unstable.

And if this is a workaround to the stairs, consider that to climb stairs, I would simply disconnect the engine, start my stair climbing animation, and ent_move the player diagonally up the stairs. Once on top, I reconnect the engine and proceed as normal. I can't forsee any circumstance where it would be advantagous to have a PE registered entity float above the ground.

Re: Humans, the physical entities [Re: fastlane69] #24253
03/17/04 04:45
03/17/04 04:45
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
floating is no problem. you have to set a target height and then apply an upward force which is proportional to the aberration. this way it's stable.

Re: Humans, the physical entities [Re: fastlane69] #24254
03/17/04 04:48
03/17/04 04:48
Joined: Mar 2002
Posts: 60
São Paulo, Brazil
L
Lord Alexion Offline OP
Junior Member
Lord Alexion  Offline OP
Junior Member
L

Joined: Mar 2002
Posts: 60
São Paulo, Brazil
Well, this can become quite complicated since my entity is a 2D SPRITE... you see, I'm making a visual environment that resembles those console RPGs and some asian PC games where you have a 2D sprite as a character in a 3D world. So, it can be quite difficult to make the character move in a natural way using a physical engine that's designed for polygons... maybe I should resort to ent_move, oh well... it'll be hard to code jumps... ^^o

Re: Humans, the physical entities [Re: ventilator] #24255
03/17/04 05:04
03/17/04 05:04
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Sort of a self correcting system? I could see how that would be stable, but given the thread, don't know where or why you would want this UNLESS a floating entity is what you wanted (like a hovercar or ghost).

As to Lords position don't give up on the PE just yet. While it may seem overkill on a 2D sprite, it can in fact give the sprite the illusion of being real if the physics are tight. Not knowing the full extent of your application though, I would have to say that it **seems** like overkill, but it may not be!!!

Re: Humans, the physical entities [Re: fastlane69] #24256
03/17/04 12:15
03/17/04 12:15
Joined: Mar 2002
Posts: 60
São Paulo, Brazil
L
Lord Alexion Offline OP
Junior Member
Lord Alexion  Offline OP
Junior Member
L

Joined: Mar 2002
Posts: 60
São Paulo, Brazil
well, the full extent of my application would be a bit large to explain in here, but the general idea is like this: have you ever seen or played tactical battle RPGs? the best examples of this kind of game are found in old Genesis games like Shining Force and the well-known PSX game Final Fantasy Tactics. My application would be an online version of those games, aimed at making tactical duels over the net, or even team battles, with each player controlling one char.

I'm aiming for a general graphical line that resembles Final Fantasy Tactics, with an isometric view and 2D anime-like chars, with a very "asian console game" feeling. Are you following me so far?

Page 1 of 2 1 2

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1