Just wanted to post to gather some ideas on implementing some features into my game. I realize there can be many ways to do something in Panda and the right way will vary based on my specific requirements, etc.
Basically, it’s a real-time squad type game. You direct a squad of 4-8 actors around a 3d environment. I have implemented camera, char creation, point-and-click movement, basic melee combat, loading map from files, etc. and am now starting to tackle interacting with the environment.
Specifically, I want some options for ways to implement:
collisions with walls (so you don’t walk through buildings)
characters jumping/climbing/flying to higher ground and then walking on say, a hill or rooftop.
making objects (car, trashcan) solid so you don’t walk through them but so they can still be picked
I currently have implemented :
actors with collision pushers, so they don’t walk through each other.
I can pick actors by clicking them
I had turned on collide mask on other objects (bldgs, trashcan) so you don’t walk through them
(yeah not too efficient yet, that’s why I’m posting )
Have not turned on physics yet, do I need to?
What options do I have to make objects solid but still pickable (saw some posts about octreefy - is that where I should be headed)?
I am not sure on this, but i believe that i saw somewhere that someone (drwr) stated that collision geometry(polygons) isn’t/can’t be animated. You can setup your model with collision solids and attach them to joints to have animated collision model (tubes for hands and legs, sphere/box for head and torso.)
It might be good idea to get nested collision for bullets.
Player is encapsulated in sphere, and first check if bullet hits sphere, if thats true, than go level deeper and check if it hits some body part.
I think you’re right that you can’t animate the coll solids.
Anyone have thoughts on the roof standing part? If I set a collide mask on a cube, can I somehow make it so the top of it is solid? i.e. I can place another model on it . Or do I need rays, etc. to detetc collision and the set the model’s Z pos,etc. for this.
I’ll apologize ahead of time if my post makes no sense or something… I’ve a fever and yeah, anyway:
what I did for the avatar’s jumping, falling (gravity), and standing on roofs etc, was pointed a ray downwards from my character, then use a collisionHandlerQueue to sort them and find the closest object, then adjust your Z to that slowly (gravity) so you can be under roofs, or on them, and it works the same. So get the Z from the ray’s closest collision (sorting via the queue, check under the manual for queue sorting)