Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Leucome

Pages: [1]
Thanks ! It will be useful to know the SuimonoGetHeight() function.
 3D  wave are a quite interesting feature. :)  I downloaded it and tested the prefab surface so far. 

I noticed that object who fall into water without any x or z velocity  did not emit any splash.

Or also when the player jump outside water it do not splash.

So I made some change to the script to get at least one splash when an object enter or exit water. I think it may be a good idea to add this feature to suimono.

To do it we can  change the water_splashHandle.js
Something like add a variable  EmitOnce = true;   to the function OnTriggerEnter   and     function OnTriggerExit and add  || EmitOnce==true  to the (if condition that trigger a splash)   finally  EmitOnce = false;  at the end  .

I also made an other buoyancy script that take speed into account to make  Hydroplaning things,  like ski nautic,   bouncing rock  on water,  snowmobile and ATV that are able to cross lake.

Anyway if someone is interested to add such feature the change done to the buoyancy script look like this with the gravity set to true so the object can sink if there are not enough speed .

Code: [Select]
if (buoyancyFactor > 0.0){
this.rigidbody.useGravity = true;
                         spd = this.rigidbody.velocity.magnitude;

Finally I found a way to get more subtle variable sound volume based on the velocity in watermodule_splasheffects.js   basicaly I divided the velocity by 10  if not the sound almost always get max volume .

Code: [Select]

if (Mathf.Abs(sndVelocity.z/10) >= setvolume) setvolume = Mathf.Abs((sndVelocity.z/10));
if (Mathf.Abs(sndVelocity.y/10) >= setvolume) setvolume = Mathf.Abs((sndVelocity.y/10));
if (setvolume > maxVolume) setvolume = maxVolume;
//setvolume = maxVolume;


Pages: [1]