Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/23/26 19:08
WFO Training with parallel cores Zorro64
by Martin_HH. 02/23/26 15:29
Camera always moves upwards?
by clonman. 02/21/26 09:29
Zorro version 3.0 prerelease!
by TipmyPip. 02/20/26 13:22
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (TipmyPip, tomaslolo, AndrewAMD, Martin_HH), 5,190 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
c_setminmax & animated entities #384588
10/05/11 07:52
10/05/11 07:52
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
c_setminmax or c_updatehull doesn't work properly, like code below:

Code:
#include <default.c>

#define PRAGMA_PATH "%EXE_DIR%\templates\models";

void main() {
	
   d3d_lines = 3; level_load("");

   you = ent_create("sf_alien.mdl", vector(250,0,0),0);
	
   c_setminmax(you);

   //wait(1); c_updatehull(you,1);
	
}


but this works:

Code:
#include <default.c>

#define PRAGMA_PATH "%EXE_DIR%\templates\models";

void main() {
	
   d3d_lines = 3; level_load("");

   you = ent_create("sf_alien.mdl", vector(250,0,0),0);
	
   c_setminmax(you);

   //wait(1); c_updatehull(you,1);

   vec_set(you.min_x, vec_for_min(you.min_x, you));
   vec_set(you.max_x, vec_for_max(you.max_x, you));
	
}




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: c_setminmax & animated entities [Re: rojart] #384604
10/05/11 11:15
10/05/11 11:15
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
c_setminmax works correctly, it sets the bounding box so all vertices of all frames are contained inside that box.
c_updatehull does not work, though.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: c_setminmax & animated entities [Re: Superku] #384607
10/05/11 11:34
10/05/11 11:34
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
Yes, but in second example should be a bounding box around all it's frames, or i'm wrong?


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: c_setminmax & animated entities [Re: Superku] #384608
10/05/11 11:36
10/05/11 11:36
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
c_updatehull also sets the bounding box, but to the size of the current collision hull.

Re: c_setminmax & animated entities [Re: jcl] #384614
10/05/11 11:59
10/05/11 11:59
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
Yes, I tried with physX, but the bounding box is bigger than the collision hull.

Last edited by rojart; 10/05/11 12:01.

Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: c_setminmax & animated entities [Re: jcl] #384663
10/05/11 23:51
10/05/11 23:51
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline OP
User
rojart  Offline OP
User

Joined: Oct 2004
Posts: 900
Lgh
Originally Posted By: jcl
c_updatehull also sets the bounding box, but to the size of the current collision hull.

Strange, because c_updatehull doesn't work for me, where only the second while loop works:

Code:
#include <default.c>

#define PRAGMA_PATH "%EXE_DIR%\templates\models";

void main() {
	
	d3d_lines = 3; level_load("");
	
	vec_set(camera.x, vector(-88,-157, 47));
	vec_set(camera.pan, vector(60, -17, 0));

	you = ent_create("sf_alien.mdl", nullvector, NULL);
	wait(1);
	
	while (you.skill1 < 20)
	{
	   c_updatehull(you, (you.frame = you.skill1++));
	   wait(-.1);
	}
	
	you.skill1 = 0;
	
	while (you.skill1 < 20)
	{
	   you.frame = you.skill1++;
	   you.eflags |= FAT | NARROW;
	   vec_set(you.min_x, vec_for_min(you.min_x, you));
	   vec_set(you.max_x, vec_for_max(you.max_x, you));
	   wait(-.1);
	}
}





Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P

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