Skip to main content
Tweeted twitter.com/#!/StackGameDev/status/257633454282383361
deleted 92 characters in body
Source Link
TheBroodian
  • 563
  • 5
  • 14

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them closer to eachother. I've read that you can achieve this by creating a 'spring', but I haven't been able to locate any resources about what a spring's physics look like, or what that might look like in code?

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them closer to eachother. I've read that you can achieve this by creating a 'spring', but I haven't been able to locate any resources about what a spring's physics look like, or what that might look like in code?

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them closer to eachother. I've read that you can achieve this by creating a 'spring', what that might look like in code?

Source Link
TheBroodian
  • 563
  • 5
  • 14

'Spring' physics

I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them closer to eachother. I've read that you can achieve this by creating a 'spring', but I haven't been able to locate any resources about what a spring's physics look like, or what that might look like in code?