Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
PH_CHAR problem #399927
04/23/12 13:57
04/23/12 13:57
Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
C
Cristiano_Iost Offline OP
Newbie
Cristiano_Iost  Offline OP
Newbie
C

Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
Hello,

I don´t know if this is a engine bug, but when I use PH_CHAR for a person physics movement, the player don´t stay his foot in the same level of a terrain, or bridge prefab, for example. This only works if I put the player in a scale z of 600.00 in or more in MED. Less that this value, the player "float".

The other problem that happens using PH_CHAR is the terrain. If I scale the terrain in WED, the PH_CHAR physics don´t works properly. The player don´t detect the position of the floor, staying under the level of terrain. I need to scale the terrain in MED to the PH_CHAR (player) and the gravity works.

The simple physics models to behave of a wrong way in this high scale too.

Bugs ?

Thanks

Re: PH_CHAR problem [Re: Cristiano_Iost] #399958
04/24/12 09:36
04/24/12 09:36
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The first problem is due to the bounding box. The default box has a fixed size for c_move. For physics movement, better set it up to the real size of the actor, either in WED, or with c_setminmax.

The second problem with the scaled terrain doesn't happen here. The vehicle sample and other samples use scaled terrain, and they work fine. Can it be the same reason as your bounding box problem? if not, can you upload a small example where we can see the problem?

Re: PH_CHAR problem [Re: jcl] #399963
04/24/12 11:05
04/24/12 11:05
Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
C
Cristiano_Iost Offline OP
Newbie
Cristiano_Iost  Offline OP
Newbie
C

Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
Yes, even using c_setminmax the player floats. Only works if I scaling the model in a high value, testing until he put your foot in the floor.

Now I see that this happens because the position of the model in MED. if I centralize the model, I need to use a high scale to touch the floor. But if i put the model under the axis of MED (the axis above of your head), I obtain the player touching the floor in a small scale.

So, the model above the axis, i need to a high scale, and under the axis, I obtain a small scale. This is the problem with PH_CHAR.

About the second problem (scaled terrain), is with PH_CHAR that this happens, not a vehicle.

Re: PH_CHAR problem [Re: Cristiano_Iost] #400052
04/25/12 09:08
04/25/12 09:08
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You must set the bounding box _before_ you register the entity for physics. Afterwards it won't have any effect.


Re: PH_CHAR problem [Re: jcl] #400065
04/25/12 11:03
04/25/12 11:03
Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
C
Cristiano_Iost Offline OP
Newbie
Cristiano_Iost  Offline OP
Newbie
C

Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
the code is:

action funcao_player()
{
jogador = my;
set(my, SHADOW);
my.emask |= ENABLE_CLICK ;
my.material = mat_metal;

c_setminmax(my);

pXent_settype(my,PH_CHAR,PH_CAPSULE);

wait(1);


my.event = evento_bola;

while(1)
{

movimento_player();
funcao_camera();
animacoes_player();

wait(1);
}
}

Putting c_setminmax before register the entity, don´t works too.
I need to put the player under the axis in MED, or scale in WED.

Re: PH_CHAR problem [Re: Cristiano_Iost] #400102
04/25/12 19:31
04/25/12 19:31
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
it kinda sound like a gravity issue here if im reading all of it correct
i think you need to apply gravity to the ph_char yourself


Compulsive compiler
Re: PH_CHAR problem [Re: Wjbender] #400187
04/26/12 18:23
04/26/12 18:23
Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
C
Cristiano_Iost Offline OP
Newbie
Cristiano_Iost  Offline OP
Newbie
C

Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
The problem not is the gravity.

Re: PH_CHAR problem [Re: Cristiano_Iost] #400222
04/27/12 11:33
04/27/12 11:33
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The code looks ok, but I can't confirm such a problem here. Maybe it's related to the used model, or terrain. Can you upload an example, or send it to Support? We'll look into this.

Re: PH_CHAR problem [Re: jcl] #400232
04/27/12 12:09
04/27/12 12:09
Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
C
Cristiano_Iost Offline OP
Newbie
Cristiano_Iost  Offline OP
Newbie
C

Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil

Re: PH_CHAR problem [Re: jcl] #400602
05/04/12 10:49
05/04/12 10:49
Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
C
Cristiano_Iost Offline OP
Newbie
Cristiano_Iost  Offline OP
Newbie
C

Joined: Aug 2007
Posts: 49
Rio Claro, São Paulo, Brazil
Jcl, Any response on this problem?

Page 1 of 2 1 2

Moderated by  jcl, Nems, Spirit, Tobias 

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