PointEntity not working
Blitz3D Forums/Blitz3D Programming/PointEntity not working
| ||
I have never known any problems with this comman before, but now it doesn't work correctly for a particular entity. The theory is this: In 3d-spaceship game (think:Elite). You have a radar target. Onscreen, the target is highlighted with a reticle, but if the reticle is off-screen, I wanted a pointer to show (in 3D) where the object is. To achieve this, I attempted 2 different things (both didnt work): 1) I created a pivot and placed it at the location of the radar target (i tried using both entityx,y,z AND the global versions.) And then creating a cone, placed in-front of the camera, and pointing at the pivot. 2) I just assigned a variable to = the handle of the target entity, and Pointed the cone at the 'variable'. I am sure #1 is the 'correct' way to do this, but I do not know why it doesn't work. The cone seems to point at a meaningless point in space. Unfortunately, I cannot post code just yet, but will put it up for download (It's really not big) The details are: Radar_pointer - Handle for Cone TargetEntity - Handle for Pivot placed at location of target cam - camera target - another camera, but only used to display target entity in bottom corner of screen |
| ||
Sounds like you need to rotate the cone pointy bit into the Z axis. Try rotatemesh cone,90,0,0 when you create it. |
| ||
Ah, I think you just solved it. Isn't it something to do with the difference between RotateEntity/RotateMesh and the fact that I am altering the axis of rotation!!! Brilliant - I cannot try it yet, as I am at work, but I'm sure you're right, Thanks loads! |
| ||
Yep that did it! Had to play around a bit, actally 0,0,90 worked :) Thanks a lot! |