GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Puzzle position trouble

gamesgengamesgen Posts: 1Member
edited November -1 in Tech Support
I am attempting to make a puzzle game but have hit a little snag in my development. I have the puzzle pieces orientation snap to the player actor by using self.positionX=playerX+((playerl.length-self.position.X)*sin(rotation))) and self.positionY=playerY+((player.width-self.position.Y)*cos(rotation))). But with the player actors length and width at a set XY position the pieces always snap to the same set location. I need the pieces to stay in whatever position they happen to land in and then move with the player actor but I can't use self.position because I need that to change relative to the Player. Please help me out here.
This discussion has been closed.