Gamestudio Links
Zorro Links
Newest Posts
blogherenowcenter
by 3s05bmmc. 06/05/24 06:08
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 853 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19057 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 | 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