Hide an entity to a specific mesh.

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

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,

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.

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?

The solution is:

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


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!

Thanks, I'll give it a shot.

Is this for a split screen two player game where you want the hud to be displayed on top of both?

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.