|
Boat in the water...
#455530
10/22/15 00:46
10/22/15 00:46
|
Malice
Unregistered
|
Malice
Unregistered
|
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: MasterQ32]
#455538
10/22/15 12:59
10/22/15 12:59
|
Joined: Jun 2007
Posts: 1,337 Hiporope and its pain
txesmi
Serious User
|
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
|
Malice
Unregistered
|
Malice
Unregistered
|
Excellent ideas! I will try and play with this. Seems like a fun challenge.
Thanks Mal
|
|
|
Re: Boat in the water...
[Re: slacer]
#455554
10/23/15 00:06
10/23/15 00:06
|
Malice
Unregistered
|
Malice
Unregistered
|
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
Serious User
|
Serious User
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
|
My approach: 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
|
Malice
Unregistered
|
Malice
Unregistered
|
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|