Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 10:32
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 604 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Gravity Problem [Re: Frits] #75558
06/08/06 23:30
06/08/06 23:30
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Hmm....

I know the code works, as I've used it...


Could it be your terrain (model)? It has it's "Polygon" flag set on right???


xXxGuitar511
- Programmer
Re: Gravity Problem [Re: xXxGuitar511] #75559
06/09/06 09:05
06/09/06 09:05
Joined: Mar 2006
Posts: 724
the Netherlands
Frits Offline
User
Frits  Offline
User

Joined: Mar 2006
Posts: 724
the Netherlands
According to the manual:

Quote:


on - use the entity's polygonal shape (default on terrain and maps)
off - use the entity's oriented bounding box (default on models and sprites).





When I use a terrain (.hmp) it does not mather if the flag is on or off, the player does not fall through the surface. The only thing is that the player is not stopped at slopes, it climbs on it even if it 90 degrees.

When I use a terrain as a model (.mdl) and set the flag, after a short walk the player falls through the surface. When the flag is not set, when the player steps on the surface it falls immediately through the surface.
Mayby I must make a sort of 'floor' just below the terain model.

I will explain why I have to use a terrain as a model;
my level is for the greatest part below the surface, so I can't use a terrain (.hmp) because you can't make a hole in it. (Or I must make 4 terrains that surrounds the actual level). Therefore I have to make a terrain, convert it into a model and make a hole in it.

Any advice?

Regards,
Frits


I like to keep scripting simple, life is hard enough as it is.
Regards,
Frits
Re: Gravity Problem [Re: Frits] #75560
06/09/06 14:19
06/09/06 14:19
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
If your using a model for terrain, then you HAVE TO use the Polygon flag. Otherwise, It will not detect the model, just fall.

Second, Please post a screen/or more precise example of the problem you are having. When the model is walking across the model, after a few steps, it falls through?


xXxGuitar511
- Programmer
Re: Gravity Problem [Re: xXxGuitar511] #75561
06/09/06 14:31
06/09/06 14:31
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
Here's one more trace example (I know your tired of 'em). This one traces from the center of the entity down, so even if the origin is under the surface, the model won't fall through unless it's halfway under.

Code:

define TraceDist, 500;
var TraceFrom[3];
var TraceTo[3];
//
...
vec_set(TraceFrom, my.x);
TraceFrom.z = my.z + my.min_z + ((my.max_z - my.min_z) / 2);
vec_set(TraceTo, TraceFrom);
TraceTo.z -= TraceDist;
my.trace_distance = c_trace(TraceFrom, TraceTo, ignore_me | ignore_passable | ignore_passents);
if (my.trace_distance == 0)
{my.trace_distance = TraceDist;}
my.trace_distance -= (my.max_z - my.min_z) / 2;
...
TraceTo.z -= TraceDist


xXxGuitar511
- Programmer
Page 2 of 2 1 2

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