Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,519 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
steps #390707
01/04/12 01:12
01/04/12 01:12
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
when my player get close to steps (model blocks or level blocks from WED) he automaticly lift and goes up to the block and i want it to keeps always on the floor and only get on the steps when i jump on them...

Re: steps [Re: Funeral] #390723
01/04/12 09:35
01/04/12 09:35
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
Hi, check the manual:

move_min_z
Determines the maximum size of steps or obstacles the player can step over using the OBB collision detection.

If the player collides with a polygon, the ellipsoid normal at collision point is evaluated. Collision with the floor results in normal.z == 1, collision at half the player size in normal.z == 0. For limiting the height the player can overstep, move_min_z can be set at a minimum z value. By default, move_min_z == -1, so a player can always glide upwards as long as the step does not exceed half his height. For overstepping only low steps, set move_min_z at a small positive value, like 0.4. Please note that the heights to overstep with a certain value depends on the actual player size.
Range:
-1 .. 1 (default: -1)
Type:
var
Example:
move_min_z = 0.4;
See also:
vglide, c_move, move_friction


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: steps [Re: sivan] #390729
01/04/12 10:48
01/04/12 10:48
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Plus, to all those things which "sivan" mentioned, you need to place your BBOX a little bit above the ground, you need to do that in your gravity script.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: steps [Re: 3run] #391019
01/07/12 02:04
01/07/12 02:04
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
thx for your help :), i've been searching, and i'm not sure exactly how to do it¡ the first mistake i did it was set GLIDE in the c_move movement mode.. i think, but what movement mode should i use? and i dont know how to place the origin of my player, all i did was to click on BBOX in WED but dunno the rest. any suggestions please?

Re: steps [Re: Funeral] #391046
01/07/12 10:20
01/07/12 10:20
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
You should use GLIDE in your "c_move" call. Search forum for a gravity script, there was one I've posted somewhere.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: steps [Re: 3run] #391080
01/08/12 04:04
01/08/12 04:04
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
well yeah you right GLIDE should be in c_move. but i realized that i have that problem only with taller objects than the player!! when they are short i have no problem and everything goes ok but when there are tall blocks and i jump on them my player just keeps ascending until it reaches the last step.
and by the way the only code for gravity in my script is
c_move(me,vector(0, 0, 0),vector(0, 0, -1), GLIDE);
i worte something about placing the origin on BBOX but i dont know how to do it?
dunno what's wrong exactly

Re: steps [Re: Funeral] #391084
01/08/12 07:10
01/08/12 07:10
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Your 'gravity' code sucks! Plus you are missing 'time_step'!!! Stop thinking, and search for gravity code I've posted some time ago, learn from it! Models origin could be anywhere, but still it's better to keep it at the models center! You should do that in MED via transform global!!


player movement (stairs)


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: steps [Re: 3run] #391177
01/09/12 03:41
01/09/12 03:41
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
i know but the game it self sucks so... anyway the gravity code work decent actually, the only problem i'm facing is with high blocks. when i walk or jump on small steps everything works fine, but when i jump on higher blocks the player fly and doesnt go down until it reaches the last step frown
i've tried with move_min_z in different values and nothing

Re: steps [Re: Funeral] #391433
01/12/12 00:44
01/12/12 00:44
Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
F
Funeral Offline OP
Junior Member
Funeral  Offline OP
Junior Member
F

Joined: Dec 2008
Posts: 83
Buenos Aires, Argentina
this is the jumping code i'm using. i took it from AUM but maybe it needs to be fixed cause when i jumo on a block or model the player doesnt go downwards and it jumps again. its like when the player is in the air and reaches and obstacle beneath him the height sets to zero making it to jump again.

my code:

vec_set(temp.x, my.x);
temp.z -= 10000;
floor = c_trace(my.x, temp.x, IGNORE_ME | IGNORE_PASSABLE | USE_BOX | GLIDE); // compute the distance between player's origin and the floor below its feet


if(joy_4 && floor < 30 && jump == 0 && J == 0)
{
jump = 1;
}
if(jump == 1)
{

c_move(me,vector(0, 0, 20*time_step), nullvector, GLIDE);
J = 1;
}
if(floor > 30)
{
jump = 2;
}
if(floor < 1 && !joy_4)
{
jump = 0;
J = 0;
}

c_move(me, nullvector, vector(0, 0, -1), GLIDE);


Moderated by  HeelX, rvL_eXile 

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