Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object.constraints #584

Open
BluePrintRandom opened this issue Aug 30, 2017 · 4 comments
Open

object.constraints #584

BluePrintRandom opened this issue Aug 30, 2017 · 4 comments

Comments

@BluePrintRandom
Copy link
Member

[idea]
KX_GameObject.constraints

store a list of all active constraints in the game object that are affecting the game object

ie:vehicle wrapper or rigid body joint etc.

also

KX_GameObject.endConstraints()

could be handy*

@Nemescraft
Copy link

Good idea, but doesn't bge.constraints.removeConstraint(constraintId) already do the endConstraints() thing?

@panzergame
Copy link
Contributor

@youle31, @DCubix, @lordloki : Do you agree with the following API proposed by BPR:

KX_GameObject.constraints --> return list of KX_ConstraintWrapper

I lean this proposition instead of something like bge.constraints.getConstraints(object) as the majority of the functions in bge.constraints are independent of an unique objects: adding a constraint depends of two objects, removing doesn't depend on any objects.

Also what to do with KX_VehicleWrapper, we should consider it as a constraint and add it into the list ?

@Nemescraft
Copy link

Vehicle Wrapper is just a bunch of constraints put together, isn't it?

@panzergame
Copy link
Contributor

@Nemescraft : Internally Vehicle Wrapper isn't a constraint, for bullet it's an action which does it management of wheel and chassis position without the help of any other physics constraint. In the same type you have character wrapper which is also an action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants