Shard Posted March 15, 2010 Share Posted March 15, 2010 How do I find a pointer or reference to the terrain that gets loaded so that I can pass it into TerrainElevation. I am using Framewerk but I don't see any functions for get terrain. Thanks Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Pixel Perfect Posted March 15, 2010 Share Posted March 15, 2010 You need to iterate through the child entity objects belonging to the LoadScene entity looking for the entity whose class key is named Terrain. example: // In ... for each child of level loop // Get the terrain entity childClass = GetEntityKey(newChild, "class",""); if(childClass == "Terrain") { terrain = newChild; } Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Shard Posted March 16, 2010 Author Share Posted March 16, 2010 You need to iterate through the child entity objects belonging to the LoadScene entity looking for the entity whose class key is named Terrain. example: // In ... for each child of level loop // Get the terrain entity childClass = GetEntityKey(newChild, "class",""); if(childClass == "Terrain") { terrain = newChild; } Quote Programmer/Engineer/Student www.reikumar.com 2.6 GHz Intel Core Duo - nVidia GeForce 8600 GT - Windows 7 64-bit - 4 Gigs RAM C++ - Visual Studio Express - Dark GDK - Leadwerks SDK Link to comment Share on other sites More sharing options...
Recommended Posts
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.