Player Bounds and Collision
by Chris · in Artist Corner · 08/27/2005 (1:23 pm) · 6 replies
Hi.
I'm using the Soldier Pack as a starting point to start prototyping some new gameplay ideas... And I have a problem.
The player collision is way to big.

Can i drop this down in script? If no, can I rebuild the model, and assign individual collsision meshes ( eg head chest arms legs ) rather than have the bounds doing it ?
I don't understand the player at all, this is the first time I've really looked at it.
Thanks!
I'm using the Soldier Pack as a starting point to start prototyping some new gameplay ideas... And I have a problem.
The player collision is way to big.

Can i drop this down in script? If no, can I rebuild the model, and assign individual collsision meshes ( eg head chest arms legs ) rather than have the bounds doing it ?
I don't understand the player at all, this is the first time I've really looked at it.
Thanks!
About the author
#2
Ho about weapons? Collision on those? I hate having my gun in the wall :)
08/27/2005 (1:42 pm)
Thank you SO So much.Ho about weapons? Collision on those? I hate having my gun in the wall :)
#3
08/27/2005 (1:46 pm)
Hm, good question. I don't know, I've never tried it. You could always just adjust your player's BB so that it encloses the weapon as well.
#4
So collision cant be animated, but an invisible collision box in specific areas would do the trick, would it not? Or am I missing some fundemental part of the player?
I'd use the bounds only at the feet, and the rest would use collision meshes to kepp you from passing through objects?
I'm way off base though huh?
08/27/2005 (1:51 pm)
Ya, I just did that, and it works, however then the players BB is stretched WAY out in front of them, and they "float" up stairs.So collision cant be animated, but an invisible collision box in specific areas would do the trick, would it not? Or am I missing some fundemental part of the player?
I'd use the bounds only at the feet, and the rest would use collision meshes to kepp you from passing through objects?
I'm way off base though huh?
#5
One thing to keep in mind is that the player's visibility is also controlled by the boundingBox. So for example if you make it really short, the player (or aiplayer) would be invisible unless his feet are on the screen. Or if it's too skinny, he'll disappear when he's on the edge of the screen, before he gets all the way off the screen.
I honestly don't know if you can have custom collision objects in addition to the scripted boundingBox. I also don't know if mounted objects can have collision objects associated with them. If you try it, post your results, I'd be interested to know if it works or not.
08/27/2005 (2:26 pm)
You're not off base, you're thinking of creative solutions to your problem, which is exactly what you should be doing. :)One thing to keep in mind is that the player's visibility is also controlled by the boundingBox. So for example if you make it really short, the player (or aiplayer) would be invisible unless his feet are on the screen. Or if it's too skinny, he'll disappear when he's on the edge of the screen, before he gets all the way off the screen.
I honestly don't know if you can have custom collision objects in addition to the scripted boundingBox. I also don't know if mounted objects can have collision objects associated with them. If you try it, post your results, I'd be interested to know if it works or not.
#6
Thanks for all your help :)
08/27/2005 (2:46 pm)
Cool, once I figure out how to get the soldier reexported from Blender and not looking like an untextured statue, I'll post some results . Thanks for all your help :)
Torque Owner Jeff Gran
To change the size of the collision box/bounding box, you must change the "boundingBox" value in /server/scripts/player.cs. The boundingBox is also the collision box. It "grows" from the place defined as the pivot of your bounding box from the modeling application, which in the case of a player is at ground level and centered from a bird's eye view.