Line pick woes
Blitz3D Forums/Blitz3D Beginners Area/Line pick woes
| ||
Can anybody tell me if line pick works with a loaded anim mesh or no? I have my level loaded in as an animesh because giles light import system demands it. Line pick goes dead. However if I load the mesh in as a standard mesh then linepick works 100 percent but then giles light importing will not work. It took me all night to finally try and load my level as a mesh to see if that was the problem - first I tried pivots, dummy objects you name it. Can any body tell me how to pick an anim mesh succesfully please? It would save me an unneccesary work around! |
| ||
Never mind - I made my workaround. Anybody else having problems with Giles animesh and using line pick, do this: Parse the giles file and let it create the lights as normal. Then inside your createlights /flares/ whatever function in your main game BB file - right after you've made your lights put this code : lx#=EntityX (Gilelights\Glight,level) ly#=EntityY (Gilelights\Glight,level) lz#=EntityZ (Gilelights\Glight,level) rlx#=EntityPitch(Gilelights\Glight) rly#=EntityYaw(Gilelights\Glight) rlz#=EntityRoll(Gilelights\Glight) lr#= light\far#/1.3 lrc#= light\r# lgc#= light\g# lbc#= light\b# nulight=CreateLight(2) PositionEntity nulight,lx#,ly#,lz# LightRange nulight,lr# LightColor nulight,lrc#,lgc#,lbc# FreeEntity (Gilelights\Glight) then right at the end of the fucntion put this: FreeEntity level ; note-whatever your level var level=LoadMesh("E:\blitz3d\mystuff\YOURLEVEL.b3d") It works so far anyhow :) linepick will then work with your mesh loaded level file no problems - useful for altering your gravity settings etc.. Hope that's easy enough to follow! |
| ||
You could always apply the pickmode to all the sub-children using my multipurpose NextChild() function from here: http://www.blitzbasic.com/codearcs/codearcs.php?code=796 Like this (untested): |
| ||
Thanks Beaker - I'll try that code..however I tried pickmode laboriously with all ten 'level' children and none of them worked! |