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
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
0 registered members (), 1,320 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem with pXent_moveglobal #368084
04/21/11 11:17
04/21/11 11:17
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline OP
Senior Member
3dgs_snake  Offline OP
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Hello,

When doing some tests with physX, I discovered something strange with pXent_moveglobal used with a PH_CHAR. Even if I put a NULL in the second parameter, it is still moving (along z axis) very fast. It works perfectly with nullvector or with a PH_RIGID.

Code:
#include <acknex.h>
#include <default.c>
#include <ackphysx.h>


function main()
{	
	physX_open();
	level_load("");
		
	vec_set(camera.x,vector(-500,-23,372));
	vec_set(camera.pan, vector(0, -30, 0));
		
	ENTITY *ground = ent_createterrain(NULL, NULL, 32, 32, 1000);
	bmap_fill(bmap_for_entity(ground, 0), vector(0, 0, 255), 100);
	pXent_settype(ground, PH_STATIC, PH_BOX);
	
	
	ENTITY *e = ent_create(CUBE_MDL, vector(0, 0, 17), NULL);
	pXent_settype(e, PH_CHAR, PH_BOX);
	
	while(1)
	{
                // not working
		pXent_moveglobal(e, NULL, NULL);
                // working
		//pXent_moveglobal(e, nullvector, NULL);
			
		wait(1);
	}
}



Best regards.

Re: Problem with pXent_moveglobal [Re: 3dgs_snake] #368105
04/21/11 15:09
04/21/11 15:09
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You're right, this will be fixed. Until then, please use nullvector when no movement is desired.

Re: Problem with pXent_moveglobal [Re: jcl] #368196
04/22/11 15:23
04/22/11 15:23
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline OP
Senior Member
3dgs_snake  Offline OP
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Thanks JCL,

I will do that, I also posted another question , perhaps you can answer, I think that pXent_movelocal and pXent_moveglobal do the same thing (I thought that pXent_movelocal should be affected by entity rotation, but I still need to do a vec_rotate on it. That is also the same thing for the rotation, they all rotate around the object axis). I don't know if it is the normal behaviour, really sorry if I'm wrong.

Best regards.

Re: Problem with pXent_moveglobal [Re: 3dgs_snake] #370432
05/13/11 10:12
05/13/11 10:12
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
You're right - I found that the source code of pXent_movelocal was confused and could never have worked.

On that occasion we've implemented new functions, pXent_move and pXent_rotate that work like it's non physics counterparts. These functions replace all old physics move functions and work for all registered entities. We've also modified your example for testing all 4 movement methods, and added it to the documentation.

http://manual.3dgamestudio.net/pXent_move.htm


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