Open BluePrintRandom opened 7 years ago
Good idea, but doesn't bge.constraints.removeConstraint(constraintId)
already do the endConstraints()
thing?
@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 ?
Vehicle Wrapper is just a bunch of constraints put together, isn't it?
@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
.
[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*