Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, AndrewAMD), 833 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
pXent_setfriction #459140
04/24/16 20:05
04/24/16 20:05
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi,

How to get automatic friction to work for pXent_move?

I tried setting pXent_setfriction(my, 100); for objects but it doesn't seem to do anything. While pXent_setelasticity (bounce effect) does seem to work.
Basically what I want is that if characters move through objects like crates they not only push away the crates but their movement speed is also reduced while doing so.

ps: pXent_settype for objects like e.g. crates is set to PH_RIGID, the player is set to PH_CHAR.


Last edited by Reconnoiter; 04/24/16 20:06.
Re: pXent_setfriction [Re: Reconnoiter] #459141
04/24/16 20:40
04/24/16 20:40
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Reconnoiter
How to get automatic friction to work for pXent_move?
If you move RIGID body with 'pXent_move' it won't have any collisions.. For CHAR you can't set friction (at least via pXent_setfriction).


Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: pXent_setfriction [Re: 3run] #459158
04/25/16 10:49
04/25/16 10:49
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi 3run,

I have set friction for the RIGID body (/crates) and move the CHAR through pXent_move against them, that should work right? But it doesn't the player CHAR just keep walking at full speed through a hundred of crates and pushes them away like its nothing. grin Maybe I am missing some flag?

ps: this what I have set for the player CHAR:

Code:
wait(1);
c_setminmax(my);
pXent_setskinwidth(my, phy_skinwidth); //permitted penetration of objects 
pXent_settype(my, PH_CHAR, PH_CAPSULE); //PH_BOX


Last edited by Reconnoiter; 04/25/16 10:52.
Re: pXent_setfriction [Re: Reconnoiter] #459167
04/25/16 15:00
04/25/16 15:00
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Reconnoiter
Hi 3run,

I have set friction for the RIGID body (/crates) and move the CHAR through pXent_move against them, that should work right? But it doesn't the player CHAR just keep walking at full speed through a hundred of crates and pushes them away like its nothing. grin Maybe I am missing some flag?

ps: this what I have set for the player CHAR:

Code:
wait(1);
c_setminmax(my);
pXent_setskinwidth(my, phy_skinwidth); //permitted penetration of objects 
pXent_settype(my, PH_CHAR, PH_CAPSULE); //PH_BOX

No, you have to know that CHAR ignores all RIGID bodies (that's the way native physX plugin works in Acknex). You can't change that by friction or by anything else. You can do some nasty workarounds, f.e. use traces to disable input, when trace hit RIGID bodies (take a look at my latest movement code that uses CHAR with BOX shape). BTW as far as I know, when you set friction via 'set_friction', it will affect only when you move that object against other bodies, not visa versa (as in your example), but I might be wrong grin


Best regards


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: pXent_setfriction [Re: 3run] #459186
04/26/16 11:08
04/26/16 11:08
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline OP
Serious User
Reconnoiter  Offline OP
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Ty for the info.

Also I noticed that adding a "EVENT_FRICTION" in the event of e.g. the player and setting "pXent_setcollisionflag(player, my, NX_NOTIFY_ON_START_TOUCH);" in the action of the rigid bodies also works for a collision event. laugh

I haven't checked yet if it is possible to set "pXent_setcollisionflag" multiple times to link each rigid body with each character, but that would be pretty sweet if that is possible (for enemies etc.).


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