Colliding first person camera

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
RobSis
Posts: 3
Joined: Tue Nov 29, 2011 7:17 pm

Colliding first person camera

Post by RobSis »

Hello.

I finally got bullet physics to work in my project, so now I want to make first person camera, that would collide with everything.

What object should I use to represent player? Cylinder? Box? Sphere?

Sphere rolls terribly long before it stops completely, box and cyllinders can flip over, and they don't work good when climbing stairs etc...
Also that object must be non-visible.

Do you have any ideas what I could do?

Thank you! btw: my first post here, so hi everybody!
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Colliding first person camera

Post by serengeor »

Hi,
What object should I use to represent player? Cylinder? Box? Sphere?
You can use any shape you like/need.
Sphere rolls terribly long before it stops completely, box and cyllinders can flip over, and they don't work good when climbing stairs etc...
You can constraint the rotation of objects so they wouldn't flip over (tried with boxes and it works alright).
Also that object must be non-visible.
Every physics object is invisible unless you make it to be visible.
Working on game: Marrbles (Currently stopped).
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: Colliding first person camera

Post by Cube_ »

I'd use a sphere (or cylinder, though preferably a sphere that is shaped like a watermelon :D, better for walking in stairs and such) that is constrained.
"this is not the bottleneck you are looking for"
RobSis
Posts: 3
Joined: Tue Nov 29, 2011 7:17 pm

Re: Colliding first person camera

Post by RobSis »

Thank you!
I will take look at the bullet's constraints.
serengeor
Posts: 1712
Joined: Tue Jan 13, 2009 7:34 pm
Location: Lithuania

Re: Colliding first person camera

Post by serengeor »

RobSis wrote:Thank you!
I will take look at the bullet's constraints.
I didn't meant constraints, there's an actual function to set limits for every axis.
Might be this one(not sure about it though):

Code: Select all

void btRigidBody::setAngularFactor      (       const btVector3 &       angFac   )
Working on game: Marrbles (Currently stopped).
RobSis
Posts: 3
Joined: Tue Nov 29, 2011 7:17 pm

Re: Colliding first person camera

Post by RobSis »

serengeor wrote:Might be this one(not sure about it though):
Yeah, I didn't know about that!
I tried to mess with it and I'm most comfortable with all rotations disabled - vector (0,0,0).
Cool stuff! Didn't tried the stairs though. Only steep platform which I had troubles to climb :)
Post Reply