Blue Solitare Posted March 12, 2010 Share Posted March 12, 2010 Does LE have a built in 2D mouse to 3D scene projection method? If so, what is it named? Thanks, Blue Quote Link to comment Share on other sites More sharing options...
macklebee Posted March 12, 2010 Share Posted March 12, 2010 take a look at CameraProject() Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Blue Solitare Posted March 12, 2010 Author Share Posted March 12, 2010 Thanks for the quick reply. I implemented the CameraProject() method from the example and things mostly work. The problem is with the glReadPixels() method. Is there another LE method that could be used to replace glReadPixels, it's really expensive. It also causes a problem in situations where the cursor is mousing over something other then the terrain, which is what I need to project to. I'm getting a false projection. I'm using LEO, if it makes a difference. Thanks, Blue Quote Link to comment Share on other sites More sharing options...
Umnik Posted March 13, 2010 Share Posted March 13, 2010 TPick pick; if(MouseHit(1)) { HideEntity(character); if(CameraPick(&pick,camera,Vec3(MouseX(),MouseY(),200.0))) { PositionEntity(cursor,Vec3(pick.X,pick.Y+0.25,pick.Z)); } ShowEntity(character); } You need use HideEntity() && ShowEntity()! Quote Windows 7 Ultimate x64bit / Intel Core 2 Quad Q8400 / 4GB DDR2 SDRAM / GeForce 8800 GTS Resource War Developer [ dev blog ] Link to comment Share on other sites More sharing options...
Blue Solitare Posted March 13, 2010 Author Share Posted March 13, 2010 Wouldn't hiding entities cause a flickering effect or cause them to go away all together? What I'm trying to do is find a replacement for glReadPixels for two reasons: 1. It's slow and expensive 2. It reads the closets pixel to the camera (in my situation), which in many cases is not what I want due to having other objects in the scene. I only want to read the terrain pixels. Is there a way (RenderWorld?) to only render the terrain, read my terrain, then render the rest of the scene? Quote Link to comment Share on other sites More sharing options...
Marleys Ghost Posted March 13, 2010 Share Posted March 13, 2010 Wouldn't hiding entities cause a flickering effect or cause them to go away all together? I use Hide and Show when casting from NPC's I have not noticed any flickering. As you can see in the two videos Here. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" Link to comment Share on other sites More sharing options...
Canardia Posted March 13, 2010 Share Posted March 13, 2010 It can't flicker because there is no rendering between Hide and Show. Only the final state is rendered. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Blue Solitare Posted March 13, 2010 Author Share Posted March 13, 2010 Good point! I'll try it out.. Thanks for the help. Quote 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.