Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Camera collision to object

Author
Message
GreenDixy
11
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 12th Jun 2014 06:16
I am looking for a way When the camera collides with a object it moves in so my camera is not inside the buildings

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
The Tall Man
6
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 12th Jun 2014 08:10
You mean to have the camera doesn't move through objects?

What I do is I create a player object that is a sphere, which I then hide so it doesn't show. That object has collision. Then I move and rotate the player object, then I assign the camera's position and rotation to match that of the object.

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
GreenDixy
11
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 12th Jun 2014 17:26 Edited at: 12th Jun 2014 17:35
I have my player, Working that's not the problem My camera follows the player say I turn my player he is beside a building the camera turns with him next thing I know my camera is inside the building while my player is outside the building I am looking for a way that if my camera hits a object it will move in tawards the player object so the camera wont go inside

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
The Tall Man
6
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 12th Jun 2014 20:07 Edited at: 12th Jun 2014 20:12
The player sphere I mentioned - think of it as a collision sphere. Same idea I mentioned above. You can experiment with positioning the sphere just next to or above the collision area of the player, for example right in front of the player's head.

You might also experiment with turning off collision between the player and the collision sphere, so they don't interact - although that might send your camera inside the player when you're up against a building. But what you also experiment with here is setting the player's position a relative position away from the sphere.

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
GreenDixy
11
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 12th Jun 2014 21:08
Currently I have it set to change the views first and third person when its in first person mode my model hides when its third it shows again

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.

Login to post a reply

Server time is: 2019-12-15 08:11:07
Your offset time is: 2019-12-15 08:11:07