how to add a buoy in Hydrax's ocean

f117f117f117677

10-03-2009 08:09:39

Hi everyone:

i just want to add a marker buoy into ocean. The buoy should moved with waves.
that is buoy drived by fluids.

So i don't know what to do by Hydrax. :?

Any suggestion would be :D appreciated.

scratchyrice

10-03-2009 17:21:58

use the ->getHeigth(float posx, float posy) method (Yes it is spelt like that, theres a slight error), Then set the height of the buoy to the return value of that method.

Cheers

Scratchy

f117f117f117677

11-03-2009 00:48:29

thank you very much ! scratchyrice
i will try right now.

Original idea is that using RaySceneQueries to put buoy into Hydrax. :D

but i failed, there is no intersections between Ray and Hydrax. :(

is Hydrax MovableObject or Worldfragment ? or neither ? So what it is?

i think we need the design paper and data structure of Hydrax.

f117f117f117677

11-03-2009 06:45:16

Yes,
I set the height of the buoy to the return value of that method.
and the buoy is standing there still (static).
this is not what i want. :(

the idea: the buoy is driven by fluids.
:mrgreen:

anyone can give some suggestions? thanks a lot.

cg76

11-03-2009 07:31:21

Check out OgreNewt for physics simulation :)

Cheers,
CG

nargil

11-03-2009 07:38:46

cg76 How do you imagine passing Hydrax waves to an physics engine ? I'm not saying its impossible, but rather very hard. I'm just curious...

cg76

11-03-2009 07:54:08

cg76 How do you imagine passing Hydrax waves to an physics engine ? I'm not saying its impossible, but rather very hard. I'm just curious...

Hmm... OgreNewt is only use to simulate the buoyancy of my ship and therefore, Hydrax waves are not passed to OgreNewt. Maybe I misunderstood f117f117f117677's question :)

Pyritie

11-03-2009 10:26:52

Yes,
I set the height of the buoy to the return value of that method.
and the buoy is standing there still (static).
this is not what i want. :(

Are you doing that every X seconds or just doing it once?

scratchyrice

11-03-2009 12:15:32

Yes,
I set the height of the buoy to the return value of that method.
and the buoy is standing there still (static).
this is not what i want.

the idea: the buoy is driven by fluids.


anyone can give some suggestions? thanks a lot.
f117f117f117677

Posts: 6
Joined: Thu Mar 05, 2009 7:17 am

Hmm, Well im afraid i cant help you there. Ive been using this method of floating since i started using hydrax 1.5 months ago. Are you sure you are positioning the node to the return value, as the Y axis?

Cheers

Scratchy

Xavyiy

11-03-2009 23:51:02

Actually you just need to call: Hydrax::getHeigth(...) (heigth, sorry for the speling error!) to get the Y-World water position of the X/Z position.
It will be enough for any physics engine.

Xavi

f117f117f117677

12-03-2009 01:04:58

Thanks all of you!

cg76: thanks for your suggestion. you let me know another important add-ons OgreNewt . i will study it in few days. :D

nargil: thanks for your attention. :wink:

Pyritie: i sincerely appreciate your help. you are bright and find the answer of my problem. i do it every X seconds again
it works. :lol:

scratchyrice: i want to thank you for your kindness help. your method is right and helps me a lot. :)

Xavyiy: your Hydrax is great. thanks a lot. :D

i still have some questions, if you have time no hurry.

Original idea is that using RaySceneQueries to put buoy into Hydrax.
but i failed, there is no intersections between Ray and Hydrax.
is Hydrax MovableObject or Worldfragment ? or neither ? So what it is?

Xavyiy

12-03-2009 01:13:12

Hydrax uses a mesh-entity interface :)

scratchyrice

12-03-2009 02:52:29

i want to thank you for your kindness help. your method is right and helps me a lot
No problem. Glad i could help :D

Cheers

Scratchy