Gamestudio Links
Zorro Links
Newest Posts
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
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
0 registered members (), 1,549 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
A problem with PH_CHAR, PH_CAPSULE #398592
04/04/12 13:47
04/04/12 13:47
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 to all,

I using pXent_settype(my,PH_CHAR,PH_CAPSULE) to create a character physics, and your gravity. But when I use PH_CHAR, the bounding box of the model don´t stay placed in the same level of the floor. The model/character float a small distance. The corretly is that the foot stay close by the floor.

I used c_setminmax to make the bounding box stay in the same height of the character but the problem persists.

This happens using PH_BOX too.

Anyone know the problem ?





Last edited by Cristiano_Iost; 04/04/12 13:51.
Re: A problem with PH_CHAR, PH_CAPSULE [Re: Cristiano_Iost] #398594
04/04/12 14:01
04/04/12 14:01
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey mate, I didn't understand what problem are you facing, but here is working example of simple movement with PH_CHAR:
Download link
I hope you'll find it useful mate! Good luck. Script is free to use.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: A problem with PH_CHAR, PH_CAPSULE [Re: 3run] #398691
04/05/12 11:39
04/05/12 11:39
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
A physics ball don´t collide close by the floor ? So... the PH_CHAR don´t make this. The model float. You can make a example and see this, putting the camera near to the floor.

I think that if is a phisycs model, the standard position should be in the same level at the floor, to avoiding that the use of a c_trace to the floor.

Re: A problem with PH_CHAR, PH_CAPSULE [Re: Cristiano_Iost] #398700
04/05/12 13:20
04/05/12 13:20
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
Check px_setunit and scale down the entity before using pxent_settype and scale it back up after this will make a smaller collision hull, also not sure bout this one but dont use models that arent centered above the ground correctly or have vertices that dont belong under it


Compulsive compiler
Re: A problem with PH_CHAR, PH_CAPSULE [Re: 3run] #399220
04/12/12 14:08
04/12/12 14:08
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
3run, in your example happens the same thing. if you put the camera nearly the foot of your model, you see that he floats a small distance of the floor.

Re: A problem with PH_CHAR, PH_CAPSULE [Re: Wjbender] #399221
04/12/12 14:10
04/12/12 14:10
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
Wjbender, i make this and don´t works.

The hull of the model stay at the same height of the model, but his foot don´t touch the floor.

Re: A problem with PH_CHAR, PH_CAPSULE [Re: Cristiano_Iost] #399223
04/12/12 14:17
04/12/12 14:17
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
There should be a small distance to ground, other ways player will get stuck.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: A problem with PH_CHAR, PH_CAPSULE [Re: 3run] #399304
04/13/12 22:17
04/13/12 22:17
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
well, I tested here, and finally to discover that this problem is because the scale of the model. If you put the model in a scale of 500 or more in Z(MED), the foot´s model, or character, touch the floor (Scale z = 500 for PH_CAPSULE). This is the solution that I find. I think that have another solution for this, and more easy.


Last edited by Cristiano_Iost; 04/13/12 22:20.

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