Sign in to follow this  


Recommended Posts

Hey, I am trying to setup a collision detection scheme in my game right now. Basically I'll have one array of objects that move and objects that are stationary. All moving objects will check themselves against the stationary and mobile objects. The problem is that the mobile objects arent all of the same class type. I was wondering if class inheritance could solve this problem. Would I be able to have all of my objects (mobile or immobile) inherit from the same base class and have functions that do things like return the position and apply collision response run the correct code for what class they actually are? Sorry if I'm unclear...heh. Thanks.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this