Hide an entity to a specific mesh.

Blitz3D Forums/Blitz3D Programming/Hide an entity to a specific mesh.

daaan(Posted 2005) [#1]
Edit: I just realized that my topic is wrong... I meant camera! not mesh! sorry.

I have 2 cameras and I don't want a certain entity to be visible to both of them. How can I do this?

Thanks,


Matty(Posted 2005) [#2]
I am guessing but I think you will have to render the scene twice, once with each camera with the object hidden during on of the renders.


daaan(Posted 2005) [#3]
Hmm.. I am having a hard time figuring it out. I'm going to try another idea. Brb.

Edit: Yep... no luck. Anyone have the solution?


octothorpe(Posted 2005) [#4]
The solution is:

you will have to render the scene twice, once with each camera with the object hidden during one of the renders



KuRiX(Posted 2005) [#5]
People doesn't want to post you an example xDD:

Camera1 = CreateCamera()
Camera2 = CreateCamera()
Cube1 = CreateCube()
Cube2 = CreateCube()

; CAMERA 1 RENDER ALL
HideEntity Camera2
RenderWorld

;CAMERA 2 RENDER ONLY CUBE2
ShowEntity Camera2
HideEntity Camera1
HideEntity Cube1
RenderWorld

Good Luck!


daaan(Posted 2005) [#6]
Thanks, I'll give it a shot.


Stevie G(Posted 2005) [#7]
Is this for a split screen two player game where you want the hud to be displayed on top of both?


daaan(Posted 2005) [#8]
I got it working! Thanks for the help everyone.

@Stevie G: It's a split screen fps and I had a problem that each players camera would clip their models and it looked all tweaked out.