boundaries

Blitz3D Forums/Blitz3D Beginners Area/boundaries

Happy Llama(Posted 2009) [#1]
is their an easier way to stop the camera from going to far not involving a cube stretched over a plain and the alpha set to zero???


GIB3D(Posted 2009) [#2]
What?


Gabriel(Posted 2009) [#3]
At the risk of appearing sarcastic ( Me?? I know, right!? ) I would like to let you know that this is not the age of the telegram. You're not charged by the word, so feel free to actually let rip with as much information as possible, because this is another question whose answer depends on information you haven't provided.

However, assuming that you want to limit your camera based on a simple cube zone ( which I'm assuming from your stretched cube comment ) then you can simply check the position boundary against your ( now imaginary ) cube boundaries.

EG:

If CameraPosX>100
   CameraPosX=100
End If
If CameraPosX<-100
   CameraPosX=-100
End If
If CameraPosY>10
   CameraPosY=10
End If
If CameraPosY<0
   CameraPosY=0
End If
If CameraPosZ>100
   CameraPosZ=100
End If
If CameraPosZ<-100
   CameraPosZ=-100
End If


Would limit you to a 200x200x10 zone around the origin.


Zeotrope(Posted 2009) [#4]
hahahaha.....Thanks! (You're not charged by the word)

I needed a laugh.


Happy Llama(Posted 2009) [#5]
thanks!!


Happy Llama(Posted 2009) [#6]
Well I was in a hurry!!


Happy Llama(Posted 2009) [#7]
and I'm ten


Naughty Alien(Posted 2009) [#8]
..guuuuttt boiiii :)


Nate the Great(Posted 2009) [#9]
@ happy llama.. ur ten? as in ten years old? or a typo... well I dont blame you for not knowing that if you are ten years old lol... what NA said


GIB3D(Posted 2009) [#10]
:D Startin programming when your young, that's what I did. Started learning using the BlitzBasic around 13 or 14. Found out about Blitz3D. I'm 18 now, but a just a few years ago I finally bought Blitz3D and it's the best :D

Also a dynamic way to do what Gabriel did is, if I have the right idea of what he's doing..



So if you change the size of the model (the cube or whatever), then you don't have to worry about changing the stopping code :D

You can use MeshHeight for the Y axis but I'm not sure if you wanted that or not.


Happy Llama(Posted 2009) [#11]
yah i am ten