Forum

Camera Collision

04 November 2016 05:59
Hello All!

I have an Eye camera in 3rd person view. I would like to apply something to the camera so that it can not go through floors and walls.

is there an example of this? I tried all physics types and i've tried parenting the camera to an object and applying the same options, nothing seems to work.

pls help!

Thanks!
05 November 2016 11:36
A year ago i made a transparent skull and head (different colors), with not transparent teeths. I use a transparent material to the head but with render above all option, so you can saw the skull "under" that… so the head material always the first you saw!

I cant try yet what the correct way to reach that, but experiment this… …make a transparent material but use max alpha and check "render above…" not all alpha (a.blend, a.sort etc.) types support that.
If i correct the result is an always visible object/material…

It is good for hud elements if you want that. - if i can make this again, i send a blend to you
05 November 2016 15:28
Oh its simple (if i correctly understand what you want):
on the material tab -> transparent ADD -> rendering options Render above all
Here is a simple scene with "front" and "back" texts. On the "back" applied that material… looks always front, maybe use shadeless option to avoid "light glitches".
05 November 2016 16:42
Ok first off, thanks for the example..That will actually come in handy!
I didn't do a great job explaining what I'm looking for.

Talking about making a game:
1) player is in the center of the screen (0,0,1).
1a) There is an Empty parented to the player around the head area.
2) B4W camera (Type: Eye) is at (0,-20,4).
2a) The camera is appended to the Empty append_semi_soft_cam
3) I use the mouse to rotate the character and in turn the camera follows the players movment. The camera also moves up and down following the mouse movement.

so my question was supposed to be this:
In my game world I have walls and objects and a floor and I would like to know how to make the camera collide with these things instead of going right through them.
I've applied all manners of different solutions but nothing seems to work, camera does not collide.

Thanks again Tamas for the response anyways! Hope my new description makes more sense.
07 November 2016 20:46
4) assume that the solution must be transportable. In one of the examples I noticed that if you are in a static room and you know the x,y co-ordinates of every wall are unchanging then you can write code based on the current camera location. In my case i don't want to have to code in the location of every wall on every level.
09 November 2016 07:19
guys any help here ?
 
Please register or log in to leave a reply.