I want an actor to snap it's position centered over another actor, can anyone point me in the right direction?
Comments
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Hi Jillian, there's a terrific snap to grid template around by Joe of FireMapleGames which is quite sophisticated.
A not-so-sophisticated solution to your problem would be something like:
---let's call ActorA the stationary actor, and ActorB the dragged actor (if it's dragged...)
Rule: ---- in the dragged actor When touch is released Interpolate self.Position.X to ActorA.Position.X Interpolate self.Position.Y to ActorA.Position.Y
been stuck on this a couple hours now, anyone have any suggestions?
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
Hi Jillian, sorry to hear about your problems there; but it should work fine. I'm not sure what's going on for it not to work... when you say the actor kinda wigs out, can you explain bit more what happens please?
An alternative to Interpolate in this situation would be to use Move behavior; though I don' think you'll have as much control.
In the meantime, hopefully someone else can think of why this isn't working properly...
By wig out i mean they vibrate really fast when they touch any of these objects with interpolation active. It's like the actor can't make up it's mind where to go, so it's going back and forth.... Anyway, i put this aside for now, will approach fresh again tomorrow.
Thanks for all your input guys! Love the ideas.
gyroscopeI am here.Member, Sous Chef, PROPosts: 6,598
I'm wondering if you've use touch pressed instead of touch released...
Comments
A not-so-sophisticated solution to your problem would be something like:
---let's call ActorA the stationary actor, and ActorB the dragged actor (if it's dragged...)
Rule: ---- in the dragged actor
When touch is released
Interpolate self.Position.X to ActorA.Position.X
Interpolate self.Position.Y to ActorA.Position.Y
hope that helps
:-)
----------------------------------------------
http://davidgriffinapps.co.uk/
Thanks!
-Jillian
An alternative to Interpolate in this situation would be to use Move behavior; though I don' think you'll have as much control.
In the meantime, hopefully someone else can think of why this isn't working properly...
Thanks for all your input guys! Love the ideas.