Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
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
1 registered members (AndrewAMD), 599 guests, and 3 spiders.
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: Bumping Your Head Physics [Re: Valdsator] #384308
10/01/11 21:42
10/01/11 21:42
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_trace(my.x,vector(my.x,my.y,my.z-200),IGNORE_ME | IGNORE_PASSABLE);
if(trace_hit && target.z > my.z+my.min_z-10)
{
I'm on the ground, respectively floating 10 quants or less above the ground. Some kind of a height buffer is usually a good idea to avoid the computation of unnecessary collisions.
my.speed_z = 0;
}


"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: Bumping Your Head Physics [Re: Superku] #384317
10/01/11 22:31
10/01/11 22:31
Joined: Mar 2009
Posts: 186
V
Valdsator Offline OP
Member
Valdsator  Offline OP
Member
V

Joined: Mar 2009
Posts: 186
Originally Posted By: Superku
c_trace(my.x,vector(my.x,my.y,my.z-200),IGNORE_ME | IGNORE_PASSABLE);
if(trace_hit && target.z > my.z+my.min_z-10)
{
I'm on the ground, respectively floating 10 quants or less above the ground. Some kind of a height buffer is usually a good idea to avoid the computation of unnecessary collisions.
my.speed_z = 0;
}

Ah, I was thinking I should use c_trace, but was once again scared away by the "slow" speed. Thank you, yet again!

Re: Bumping Your Head Physics [Re: Valdsator] #384325
10/01/11 23:22
10/01/11 23:22
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_move is based on c_trace with USE_BOX, thus c_trace without USE_BOX is faster than a c_move call.
c_trace is probably the most important Gamestudio function for all games, don't be afraid to use it. That means, use it whenever necessary and avoid it whenever possible. There are a lot of options to keep c_trace fast (use the IGNORE_... commands, keep the trace short, only use USE_BOX when necessary and so on).


"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
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