One actor moves toward another based on proximity?
Jeffm2
Member, PRO Posts: 148
All,
I am trying to develop a learning game based on physics (electric principles, etc) and im trying to figure out how to make certain tasks interactive. I am having trouble putting into words what i am trying to do which is making a forum search difficult so forgive me.
I would like to make a hanging ball that as a negatively charged rod is put closer to it the ball starts to move toward the rod, thus showing it has a positive charge. I understand tying one set of coordinates to the other but if i want one end to remain attached? and how do i do this based on the proximity of the rod?
Kind of like this. Any thoughts or where to start looking.
Thanks in advance
Comments
use the magnitude function to determine the distance between the two, within a rule that says if that distance <= x, then do whatever you need it to do.
Here is a video I did about the Magnitude Function if you want to check it out.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c PERFECT!!!
Wanted to thank everyone for their input and show what has been done so far. Its very flawed but I couldnt have gotten tis far without your help. Its not complete but gives you the iea of where its going.
@Jeffm2, That's really cool. Seems like it's coming along nice. I completed the first task and it didn't move on to a second, I assume it's not programmed in yet but just in case I wanted to let you know.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
@jamie_c Right. Just the one so far
that's pretty cool.
seems to be a layering issue with the notebook and plastic rod though that takes away from the depth effect on the display.