Gamestudio Links
Zorro Links
Newest Posts
nba2king Latest Roster Update Breakdown
by joenxxx. 10/14/25 06:06
Help!
by VoroneTZ. 10/14/25 05:04
Zorro 2.70
by jcl. 10/13/25 09:01
ZorroGPT
by TipmyPip. 10/12/25 13:58
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 10/11/25 18:45
Reality Check results on my strategy
by dBc. 10/11/25 06:15
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (Grant, joenxxx), 9,921 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
joenxxx, Jota, krishna, DrissB, James168
19170 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Differences between pXent_movelocal and pXent_moveglobal #368090
04/21/11 12:46
04/21/11 12:46
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,

Sorry to ask this question but I think I can do the same thing with pXent_movelocal and pXend_moveglobal.

pXent_movelocal(entity, 0, vector(500, 0, 0), NULL); and
pXent_moveglobal(entity, vector(500, 0, 0), NULL); will put the entity on the same coordinates.

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


function main()
{	
	physX_open();
	level_load("");
		
	vec_set(camera.x,vector(-500,-23,200));
	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(20, 20, 17), NULL);
	pXent_settype(e, PH_CHAR, PH_BOX);
	
	var angle = 0;
	while(1)
	{
		angle += 5 * time_step;	
		
		// These two functions do the same thing
		pXent_moveglobal(e, nullvector, vector(angle, 0, 0));
		//pXent_movelocal(e, 0, nullvector, vector(angle, 0, 0));
			
		wait(1);
	}
}



Thanks alot.

Re: Differences between pXent_movelocal and pXent_moveglobal [Re: 3dgs_snake] #368091
04/21/11 12:49
04/21/11 12:49
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I think two lines you've (as example) posted above, only will move physical objects in X coordinates!
To see differences between them, you need to change model's angle, and to use it in pXent_movelocal.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Differences between pXent_movelocal and pXent_moveglobal [Re: 3run] #368093
04/21/11 13:11
04/21/11 13:11
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
Hi,

Thanks for you answer, here is another example keys are (r) => rotate and (up), (down), (left), (right) for moving, and they still do the same thing :

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

function main()
{	
	physX_open();
	level_load("");
	
	vec_set(camera.x,vector(-500,-23,200));
	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(20, 20, 17), NULL);
	pXent_settype(e, PH_CHAR, PH_BOX);
	
	var angle = 0;
	while(1)
	{
		if (key_r)
			angle += 5 * time_step;	
		//pXent_moveglobal(e, NULL, NULL);
		
		VECTOR temp;
		vec_set(&temp, vector((key_cuu - key_cud) * 5 * time_step, (key_cul - key_cur) * 5 * time_step, 0));
		
		// These two functions do the same thing
		//pXent_moveglobal(e, &temp, vector(angle, 0, 0));
		pXent_movelocal(e, 0, &temp, vector(angle, 0, 0));
			
		wait(1);
	}
}




Moderated by  HeelX, Spirit 

Gamestudio download | 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