XNA Creators Club Online
Page 1 of 1 (3 items)
Sort Posts: Previous Next

Help with figuring out height of x,z on a moving mesh.

Last post 06/07/2009 16:10 by ClanClun. 2 replies.
  • 06/07/2009 12:01

    Help with figuring out height of x,z on a moving mesh.

    I have a sea that uses moving vertices to create a wave effect. I have a ship that moves around in the ocean but not 'over' the waves. I have looked at using basic collision detection (already implemented on the ship) but think it will be too cpu consuming when there are 40+ ships. Do they need collision detection when they are always 'in' the sea anyway?
    I was thinking a simple query using x,z of the ship to query the sea mesh so it returns the Y value of the triangle at that coord would work but I have no idea on any theory of how to do this. Can anybody help? Would using something based on the triangle selection work?


    Thanks for any help
  • 06/07/2009 12:53 In reply to

    Re: Help with figuring out height of x,z on a moving mesh.

    if the ocean is just an undulating heightmap then you can use a standard height map test no?
    Game hobbyist hell-bent on coding a diabolical Matrix
  • 06/07/2009 16:10 In reply to

    Re: Help with figuring out height of x,z on a moving mesh.

    no it does not use hieghtmaps. it uses an fx file to directly alter heights.


    taken from :


    http://www.ziggyware.com/readarticle.php?article_id=253
Page 1 of 1 (3 items) Previous Next