Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 570 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Boat in the water... #455530
10/22/15 00:46
10/22/15 00:46

M
Malice
Unregistered
Malice
Unregistered
M



How would you make a boat pitch and yaw to the waves caused by a noise deform water terrain?

Just a challenge for the bored...I don't really need it.
Mal

Re: Boat in the water... [Re: ] #455532
10/22/15 01:57
10/22/15 01:57
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
maybee you can use c_trace , a big point abouve the boat to trace the water then make the boat slow in turning , i think you can use smooth() too for tilt and roll

Re: Boat in the water... [Re: Dico] #455533
10/22/15 03:46
10/22/15 03:46
Joined: Jan 2014
Posts: 77
USA
sitrep Offline
Junior Member
sitrep  Offline
Junior Member

Joined: Jan 2014
Posts: 77
USA

|
|
CoolBoat
-*----X----*-
z | z
z | z
z | z

what about the roll, surge, and sway ? calculations based on changes to liquid terrain ?

Re: Boat in the water... [Re: sitrep] #455537
10/22/15 10:52
10/22/15 10:52
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
calculate water surface normal and align the boats tangents to them

surface normal can be calculated by taking 4 samples around the boat


Visit my site: www.masterq32.de
Re: Boat in the water... [Re: MasterQ32] #455538
10/22/15 12:59
10/22/15 12:59
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
I would vertically trace two points close to fore and aft, compute tilt with hit points height difference and roll with YZ members of the average of hit normals transformed to boat space.

Last edited by txesmi; 10/22/15 13:55.
Re: Boat in the water... [Re: txesmi] #455543
10/22/15 16:42
10/22/15 16:42

M
Malice
Unregistered
Malice
Unregistered
M



Excellent ideas! I will try and play with this. Seems like a fun challenge.

Thanks
Mal

Re: Boat in the water... [Re: ] #455551
10/22/15 21:00
10/22/15 21:00
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline
Expert
slacer  Offline
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Why not just use an Animation?
If it is a movie - try to simulate it
If it is a game - fake it

If you develop a racing game, you would use particles to Show some Kind of dust behind the cars. But would you take the wind direction into your game? I don't think so.

Just use some different idle animations for a boat in small waves / big waves.

Well if your game is a kind of "SIM Sail Boat", you could be forced to throw some math into your game.

Just an idea...

Re: Boat in the water... [Re: slacer] #455554
10/23/15 00:06
10/23/15 00:06

M
Malice
Unregistered
Malice
Unregistered
M



It's not a movie or a game. Just a fun awesome challenge to play with.

I think I'm going to sample a square area around the boat, then sum the major swells and dips of all the normalizes. Then use that data to make a four corner plane, then align the boat to the normal of that plane.

Re: Boat in the water... [Re: ] #455559
10/23/15 09:35
10/23/15 09:35
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
My approach:
Click to reveal..

vec_set ( vO, vector(90,0,200) );
vec_rotate ( vO, vector(entBoat.pan,0,0) );
vec_add ( vO, entBoat.x );
vec_set ( vT, vector(vO.x,vO.y,-200) );
c_trace ( vO, vT, IGNORE_PASSABLE );
vec_set ( vP, hit.x );
vec_set ( vN, hit.nx );
vec_set ( vO, vector(-90,0,200) );
vec_rotate ( vO, vector(entBoat.pan,0,0) );
vec_add ( vO, entBoat.x );
vec_set ( vT, vector(vO.x,vO.y,-200) );
c_trace ( vO, vT, IGNORE_PASSABLE );
entBoat.z = vP.z - hit.z;
entBoat.tilt = atan2v ( entBoat.z, 180 );
entBoat.z *= 0.5;
entBoat.z += hit.z;
vec_add ( vN, hit.nx );
vec_rotate ( vN, vector(entBoat.pan,0,0) );
entBoat.roll = atan2v ( vN.y, vN.z );

Re: Boat in the water... [Re: txesmi] #455564
10/23/15 17:52
10/23/15 17:52

M
Malice
Unregistered
Malice
Unregistered
M



^+1 I like it..

Page 1 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