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 (), 677 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
lorikob361, LucasJoshua, Baklazhan, Hanky27, firatv
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
CHAR movement #360307
02/23/11 13:06
02/23/11 13:06
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
I'm trying to make basic movement with PhysX, here is the example:
Code:
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
#include <ackphysX.h>
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
function main()
{
	fps_max = 60;
	physX_open();
	video_set(800,600,32,0); 
	level_load("1.wmb"); 
	wait(3);
	sun_light = 0;
	pX_setgravity(vector(0,0,-10));
	sky_color.red = 1;
	sky_color.green = 1;
	sky_color.blue = 1;
}
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
#define absdist_x skill1
#define absdist_y skill2
#define absdist_z skill3
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
action hero()
{
	player = my;
	pXent_settype(my,PH_CHAR,PH_CONVEX);
	pXent_setskinwidth(my,0);
	while(1)
	{
		my.absdist_x = 10 * (key_w - key_s) * time_step;  
		my.absdist_y = 10 * (key_a - key_d) * time_step;
		result = c_trace(my.x,vector(my.x,my.y,my.z-1000),IGNORE_ME|USE_BOX);
		if(result > 10){my.absdist_z -= 0.1 * time_step;}
		else{my.absdist_z = 0;}
		vec_rotate(my.absdist_x,my.pan);
		my.pan -= 0.5 * mickey.x * time_step;
		pXent_movechar(my,my.absdist_x,my.pan,0); 		
		vec_set(camera.x,vector(my.x,my.y,my.z + 1200)); 
		camera.pan += ang(my.pan - camera.pan) * time_step * 0.8;
		camera.tilt = -90; 
		wait(1);
	}
}
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////
action pX_boX()
{
	pXent_settype(my,PH_RIGID,PH_BOX);
	pXent_setfriction(my,100);
	pXent_setskinwidth(my,0);
}
//////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////

And here is the demo:
Download link
It works, but sometimes pushed crates, change they angle (PAN) after they stopped moving, what is wrong in my script?


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CHAR movement [Re: 3run] #360375
02/23/11 19:47
02/23/11 19:47
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
No need to help me, fuck it!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CHAR movement [Re: 3run] #360376
02/23/11 19:56
02/23/11 19:56
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
lol I guess it's just a PhysX problem, your code has nothing to do with that crates problem, maybe ccd

Last edited by painkiller; 02/23/11 19:56.

3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: CHAR movement [Re: painkiller] #360381
02/23/11 20:02
02/23/11 20:02
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Thank u bro. Sorry for using bad words. Thing that kills me, is that no one response...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CHAR movement [Re: 3run] #360391
02/23/11 20:40
02/23/11 20:40
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
Please don't use this f*** word here in the forum!!! Thanks

From the Board Rules: - Do not post vulgar, racist, or insulting messages.



Last edited by Widi; 02/23/11 22:05.
Re: CHAR movement [Re: Widi] #360472
02/24/11 08:59
02/24/11 08:59
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
I already apologized for that. I was just really upset, sorry once again for using such words.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CHAR movement [Re: 3run] #360505
02/24/11 16:21
02/24/11 16:21
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
May be this all caused by PhysX driver? May be I need to update it or something?!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CHAR movement [Re: 3run] #364591
03/19/11 13:41
03/19/11 13:41
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CHAR movement [Re: 3run] #365226
03/24/11 16:44
03/24/11 16:44
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Glad you all helped me, thanks, I appreciate it...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: CHAR movement [Re: 3run] #365227
03/24/11 16:45
03/24/11 16:45
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 1 of 2 1 2

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