Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: bonding box [Re: MMike] #300118
11/29/09 21:34
11/29/09 21:34
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
Manual says that the c_setminmax is enough laugh I don't know exactly, ask the better programmer, I am not that good. Anyways it works now with c_setminmax in a loop.


a generator of dull questions smile
Re: bonding box [Re: BastovBros] #300120
11/29/09 21:41
11/29/09 21:41
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
You have a wait(1) before c_setminmax? (From the manual).

Re: bonding box [Re: Widi] #300171
11/30/09 11:40
11/30/09 11:40
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
well, since I have it in the loop, I don't need wait(1) now.....


a generator of dull questions smile
Re: bonding box [Re: BastovBros] #300192
11/30/09 13:45
11/30/09 13:45
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
btw, another issue about the bounding box: I am using the c_trace to simulate the gravity, but I don't know why the player walk with his feet a bit under the ground, and sometimes the player walks on different distance from the terrain surface. I tried to chnage the boundin box's z value, so that it begins a bit under the model, though it didn't help much, the player walks well on certain areas but under the ground with his feet on other areas. The question is: how to simulate the gravity, so that the player walks perfectly on the terrain surface. I just played the "Territory" demo, the player walks perfectly on the surface there, I wanted to write this question in that thread but it would be off-topic in the projects section. So, can anyone help?
Btw, here is the part of the code I use in the player's action, it also simulates the fall with acceleration.
Code:
var a = 1;
action player(){
	while(1){
c_setminmax(me);
vec_set(my.min_x,vector(0,-1.2,-0.7));
vec_set(my.max_x,vector(2.7,1.2,13));
   	trace_to_ground = c_trace(my.x, vector(my.x,my.y,my.z-5000),IGNORE_ME|IGNORE_PASSENTS|IGNORE_PASSABLE|IGNORE_SPRITES|USE_BOX);
   	if(trace_to_ground > 1){
   		a +=0.2;
   		if(my.z > target.z){my.z -= a*time_step;
}
if(my.z < target.z){my.z = target.z;
}
wait(1);}




a generator of dull questions smile
Re: bonding box [Re: BastovBros] #300201
11/30/09 14:09
11/30/09 14:09
Joined: Oct 2009
Posts: 149
Germany
M
muffel Offline
Member
muffel  Offline
Member
M

Joined: Oct 2009
Posts: 149
Germany
I would use c_move for the falling part
so the feets aren't under the surface if your Bounding Box is right

muffel

Re: bonding box [Re: muffel] #300209
11/30/09 14:45
11/30/09 14:45
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
OK, I'll try this, but how about simply walking on a surface?


a generator of dull questions smile
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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