I'm currently working with SKPhysicsJointSpring
to connect a number of nodes together. I'd like to be able to specify the force using a logarithmic formula, rather than Hooke's law.
Is there a way for me to subclass SKPhysicsJoint
to provide my own force calculations? Or must I implement this manually in update(..)
?
Many thanks,
You have to implement it “manually in
update
”, or some other way.SKPhysicsJoint
and its apparent subclasses aren't even real. Try printing one:You actually get instances of classes from the private PhysicsKit framework, and you can't subclass those classes.