Jump to content

terrain height


wh1sp3r
 Share

Recommended Posts

Hi,

 

pleaqse, how can i get terrain handle from editor ? i would like to set height of object, thanks

 

require("scripts/class")

local class=CreateClass(...)


function class:CreateObject(model)
local object=self.super:CreateObject(model)

       function object:Update() 

       height = TerrainElevation(terrain,10,10)      
       object.model:SetPositionf( 10,height,10 )        
       end	
end

-= Phenom II X4 965 3.4Ghz - ATI HD5870 - 6 GB DDR3 RAM - Windows 8 Pro 64x=-

Website: http://www.flamewarestudios.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...