Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
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 (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Model to react to moving terrain waves? #40084
01/26/05 01:40
01/26/05 01:40
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
How can I make my model to react to moving terrain waves?

Re: Model to react to moving terrain waves? [Re: XNASorcerer] #40085
01/26/05 04:29
01/26/05 04:29
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Good Question!

I have no idea!!

Possibility a) is that it does so automatically; that is the entity reacts to the geometry real time.

Possibility b) is that it won't do it at all; that is the entity only reacts to the original compiled geometry and not the scripted real time one. If this is true, it may be impossible as trace() would also react to compiled and not scripted terrain.



Have you run trials? What have you come up with?

Re: Model to react to moving terrain waves? [Re: XNASorcerer] #40086
01/26/05 06:17
01/26/05 06:17
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Try calling c_updatehull to update the collision shape of your terrain after each animation frame.

Re: Model to react to moving terrain waves? [Re: Marco_Grubert] #40087
01/26/05 06:41
01/26/05 06:41
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
Can you be a little more specific? Can you give a example? I am trying to make a jet ski to move in the waves.
Thanks.

Re: Model to react to moving terrain waves? [Re: Marco_Grubert] #40088
01/26/05 08:10
01/26/05 08:10
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Quote:

Try calling c_updatehull to update the collision shape of your terrain after each animation frame.




Awesome! It's good to know that terrain collision dynamics is real time. Thanks Marco!!!

@sorceror

A terrain, like an entity, can have a action attached to it. Call the above as part of it's action whenever you deform it and your entities should respond to the new terrain automatically!!! Very Nice!!!

Re: Model to react to moving terrain waves? [Re: fastlane69] #40089
01/26/05 09:26
01/26/05 09:26
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
It says Error(269)- Syntax Error
Where should I put this "c_updatehull" and which are their parameters?
I am using this code from Aum:
Code:
 


define amplitude skill1;
define water_speed skill2;
define number_of_vertices 2025;//16896; // vertices x vertices. The .HMP Provided is 16896

////////////////////////////////////////////////////////////////////////////////////////

var vertex_array[number_of_vertices];
var counter;
var index;

function nice_waves
{
if (my.amplitude == 0)
{
my.amplitude = Onda;//3;//1.5;//.7; // This is the height
}
if (my.water_speed == 0)
{
my.water_speed = 7; // This is the speed of the waves
}
counter = 0;
while (counter < number_of_vertices)
{
vertex_array[counter] = random(360); // set random values in vertex_array
counter += 1;
}
while (1)
{
index = 0;
while (index < number_of_vertices)
{
vec_for_mesh(temp, my, index); // store the vertex coordinates in temp
temp.z = sin(counter + vertex_array[index]) * my.amplitude; // change the z component
vec_to_mesh(temp, my, index); // deform the terrain entity
index += 1;

}
counter += my.water_speed * time;
wait(1);
}
}



Last edited by Sorcerer; 01/26/05 09:38.
Re: Model to react to moving terrain waves? [Re: fastlane69] #40090
01/27/05 09:27
01/27/05 09:27
Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
XNASorcerer Offline OP
Expert
XNASorcerer  Offline OP
Expert

Joined: Dec 2001
Posts: 2,172
Portugal - Brazil
fastlane69,

Did you manage to use c_updatehull?

Re: Model to react to moving terrain waves? [Re: XNASorcerer] #40091
01/27/05 11:10
01/27/05 11:10
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Nope. Haven't played around with it.

Re: Model to react to moving terrain waves? [Re: XNASorcerer] #40092
02/01/05 10:57
02/01/05 10:57
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Sorry that was a misunderstanding. c_updatehull only retrieves animations stored in the MDL file.
Directly changing vertices is not supported, the collision hull update would take too long.

Re: Model to react to moving terrain waves? [Re: Marco_Grubert] #40093
02/01/05 11:02
02/01/05 11:02
Joined: Mar 2003
Posts: 5,377
USofA
fastlane69 Offline
Senior Expert
fastlane69  Offline
Senior Expert

Joined: Mar 2003
Posts: 5,377
USofA
Pity.


Moderated by  HeelX, Spirit 

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