Wait 1 second Moraldi. What have you named the camera variable? and did you make sure you turned it into a Global variable?
An example:
Graphics3D 800, 600, 0, 2
AmbientLight 255, 255, 255
Global show_text
Global show
Global cam = CreateCamera()
CameraRange cam, 1, 5000
PositionEntity cam, 0, 1, 0
Global my_object = CreateCube()
EntityColor my_object, 0, 0, 255
PositionEntity my_object, 0, 1, 4
Global sky = CreateSphere(25)
ScaleEntity sky, 1000, 1000, 1000
EntityColor sky, 0, 192, 255
EntityOrder sky, 9
FlipMesh sky
EntityAlpha my_object, .7
EntityShininess my_object, 1.0
Global land = CreatePlane()
Global landtex
landtex = LoadTexture("grass.jpg")
EntityTexture land, landtex
While 1-KeyDown(1)
PositionEntity sky, EntityX(cam), EntityY(cam), EntityZ(cam) ;position sky at cam coordinates so player cannot walk through sky object
MoveEntity cam, 0, 0, 0.4*(KeyDown(200)-KeyDown(208))
TurnEntity cam, 0, 1.0*(KeyDown(203)-KeyDown(205)), 0
UpdateWorld()
RenderWorld()
keyz = KeyHit(44)
keyx = KeyHit(45)
If keyz = 1 show = 1
If keyx = 1 show = 0
If show = 1
If EntityInView(my_object, cam) ;my_object: any object that you want the object to see the camera with or switch it around and same thing.
Text 10, 10, "I can see object: "+my_object
Text 10, 30, "Hint: move camera around until object is not seen"
Else
Text 10, 10, "I cant see object: "+my_object
Text 10, 30, "Hint: move camera around until object is not seen"
Text 10, 50, EntityX(cam)
Text 10, 70, EntityY(cam)
Text 10, 90, EntityZ(cam)
EndIf
EndIf
Flip
Wend
EndArrow keys to move camera
Z key to show debug menu
X key to hide debug menu
Note: You will need the grass.jpg texture from the media file inside of samples/mak/castle =)
hope that helps u! =)
g/l w/ ur project! =)
~DarkShadowWing~