Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, AndrewAMD), 410 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Fake AABB [Re: 3run] #422799
05/17/13 07:59
05/17/13 07:59
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Originally Posted By: 3run
Sure, you are correct. Since AABB is not supported any more (but it still works) all c_ instructions in Acknex use ellipsoid shape. About the demo, unfortunately it does not provide a real AABB alternative, but just a fake one made out with ellipsoid shapes. Sorry for describing it wrong in my posts above.

Greets


No, I've made some tests. c_move and c_rotate use a box shape, c_trace (with USE_BOX) uses really an ellipsoid shape.

Re: Fake AABB [Re: oliver2s] #422807
05/17/13 10:42
05/17/13 10:42
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: oliver2s
No, I've made some tests. c_move and c_rotate use a box shape, c_trace (with USE_BOX) uses really an ellipsoid shape.
That is not possible.. Could you please upload a small example, which will show, that c_move and c_rotate are using box shapes?

Originally Posted By: Manual -> The Collision Engine


For a collision of a moving actor with an obstacle, the engine uses an Ellipsoid vs. Polygon collision detection. An ellipsoid is a distorted sphere that can emulate many collision shapes, such as cylinders, spheres or flat disks.



Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Fake AABB [Re: 3run] #422820
05/17/13 13:37
05/17/13 13:37
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
You already gave yourself the answer: in your posted table the manual says:



And here my code example. Try to move the box with W,A,S,D and hit the other box. You will see the difference:

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

#define C_TRACE
//#define C_ROTATE

void main()
{
	video_mode=9;
	fps_max=60;
	
	level_load("");
	
	ENTITY* ent_tmp1=ent_create(CUBE_MDL,vector(30,0,0),NULL);
	vec_set(ent_tmp1.scale_x,vector(8,4,0.5));
	c_setminmax(ent_tmp1);
	
	ENTITY* ent_tmp3=ent_create(CUBE_MDL,vector(0,30,50),NULL);
	vec_set(ent_tmp3.scale_x,vector(4,2,1));
	ent_tmp3.pan=90;
	ent_tmp3.tilt=200;
	c_setminmax(ent_tmp3);
	
	camera.x=-250;
	camera.z=25;
	
	//c_trace method -> using ellipsoid
	#ifdef C_TRACE
		while(1)
		{
			
			VECTOR vec_tmp1,vec_tmp2; 
			
			vec_set(vec_tmp1,vector(0,(key_a-key_d)*time_step*2,(key_w-key_s)*time_step*2));
			
			vec_set(vec_tmp2,ent_tmp3.x);
			vec_add(vec_tmp2,vec_tmp1);
			
			me=ent_tmp3;
			result=c_trace(ent_tmp3.x,vec_tmp2,USE_BOX|IGNORE_ME);
			if(result==0)
			{
				vec_add(ent_tmp3.x,vec_tmp1);
			}

			wait(1);	
		}
	#endif
	
	//c__rotate method -> using box method
	#ifdef C_ROTATE
		while(1)
		{
			var ent_tmp3_x_=ent_tmp3.y;
			var ent_tmp3_z_=ent_tmp3.z;
			ent_tmp3.y+=(key_a-key_d)*time_step*2;
			ent_tmp3.z+=(key_w-key_s)*time_step*2;
			
			result=c_rotate(ent_tmp3,vector(1,1,1),0);
			if(result<=0)
			{
				ent_tmp3.y=ent_tmp3_x_;
				ent_tmp3.z=ent_tmp3_z_;
			}
			else
			{
				vec_sub(ent_tmp3.pan,vector(1,1,1));
			}

			wait(1);	
		}
	#endif
}






Re: Fake AABB [Re: oliver2s] #422827
05/17/13 15:20
05/17/13 15:20
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: oliver2s
You already gave yourself the answer: in your posted table the manual says:
Well, it's says that Box>Box used only for Model>Sprite collusions, or am I wrong? wink

BTW, your code doesn't show, that c_rotate uses box shape. Rotate entity with it, and set GLIDE flag on, you'll see.
And there is no way, for c_trace to have ellipsoid shape, but box for c_move and c_rotate, as they made of c_traces:
Originally Posted By: Manual -> The Collision Engine
Both c_move and c_rotate internally make use of c_trace by automatically setting USE_BOX and providing additional functionality such as gliding. If USE_BOX is not set, the c_trace collision will always use a ray. If the USE_BOX mode is set, c_trace tests an ellipsoid shape against polygonal targets. The collision shape used by c_move or c_rotate is either an oriented ellipsoid or an oriented box. Which one of these two is used depends on whether the collision is with a polygonal or a nonpolygonal target.




Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Fake AABB [Re: 3run] #422828
05/17/13 15:27
05/17/13 15:27
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
Originally Posted By: 3run
Well, it's says that Box>Box used only for Model>Sprite collusions, or am I wrong? wink

BTW, your code doesn't show, that c_rotate uses box shape. Rotate entity with it, and set GLIDE flag on, you'll see.
And there is no way, for c_trace to have ellipsoid shape, but box for c_move and c_rotate, as


You mixing many things up. Box-Box means Model->Model OR Model-Sprite without POLYGON activated. And if you activate GLIDE the model doesn't even rotate, it also moves.

And of course my example shows that c_rotate uses box shape. It rotates a box and gives results if a collision detection happend or not. If it would use an ellipsoid, it wouldn't recognize a collision on the edge corners of the box, but it does.

Your quote of the manual that c_moves makes use of c_trace is right for sure. It says an ellipsoid is used for POLYGONAL entities. For BOX entities it uses still a box shape:
Originally Posted By: mighty manual
The collision shape used by c_move or c_rotate is either an oriented ellipsoid or an oriented box. Which one of these two is used depends on whether the collision is with a polygonal or a nonpolygonal target.

Last edited by oliver2s; 05/17/13 15:38.
Re: Fake AABB [Re: oliver2s] #422834
05/17/13 18:06
05/17/13 18: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
Well I still didn't get it, but I won't argue with you, cause you are much more experienced than me laugh I would be greatfull, if you could upload an example, wich provides box shape and uses c_move with level blocks, cause I''ve never got it to work. With glide float set on.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Fake AABB [Re: 3run] #422835
05/17/13 18:40
05/17/13 18:40
Joined: Aug 2002
Posts: 3,258
Mainz
oliver2s Offline
Expert
oliver2s  Offline
Expert

Joined: Aug 2002
Posts: 3,258
Mainz
If I get the manual right, on maps (level blocks?) only ellipsoid will be possible. I just overread that you want it on level blocks. My argues were for model blocks only. Sorry for the confusion.

Re: Fake AABB [Re: oliver2s] #422836
05/17/13 19:40
05/17/13 19:40
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Ahh, I got it now. Well, then solution with traces isn't that bad laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Fake AABB [Re: 3run] #449980
04/04/15 11:30
04/04/15 11:30
Joined: Mar 2015
Posts: 23
Frankfurt
JcI_the_second Offline
Newbie
JcI_the_second  Offline
Newbie

Joined: Mar 2015
Posts: 23
Frankfurt
Link is broke. Can someone upload?

Thanks

Re: Fake AABB [Re: JcI_the_second] #449983
04/04/15 11:38
04/04/15 11:38
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
You won't get the sources just by faking jcl.

Page 2 of 3 1 2 3

Moderated by  adoado, checkbutton, mk_1, Perro 

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