I can NOT figure this out.
fightjunkie01@hotmail.com
Member, PRO Posts: 60
Ok,
So I have constrained the actors self position to mouse touch for X and Y. That makes it so he follows my fingers as long as I'm touching him... So thats all good. But I only need him to follow for 50 pixels or so in whichever direction I press and drag him. Once he reaches that limit of 50 I want it to be like I have released my touch and now he freely falls whever he is at.
So think of it like this.
The app Move the Box.
You have a actor sitting on top of another actor. You can drag him either left,right,up or down but only for about 50 pixels then he free falls from where he is at! I need that movement and I am pulling my hair out trying to get this right.
So I have constrained the actors self position to mouse touch for X and Y. That makes it so he follows my fingers as long as I'm touching him... So thats all good. But I only need him to follow for 50 pixels or so in whichever direction I press and drag him. Once he reaches that limit of 50 I want it to be like I have released my touch and now he freely falls whever he is at.
So think of it like this.
The app Move the Box.
You have a actor sitting on top of another actor. You can drag him either left,right,up or down but only for about 50 pixels then he free falls from where he is at! I need that movement and I am pulling my hair out trying to get this right.
Comments
when self.position.X < centerpoint+50
AND
when self.positionX > centerpoint - 50
constrain to mouse X & Y
OTHERWISE
fall down
where centerpoint is where the blocks are located. You could have this be a static global attribute, or maybe a local (to the actor) self attribute that is updated when the game starts:
change attribute self.centerpoint = self.positionX
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I'd put restitution to 0, high density and high friction maybe?
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left