Constrain Attributes
DimensionGames
PRO Posts: 993
Hey all! I have a actor (hammer) which is constrained to another actors position (Character) which in turn is interpolating to somewhere else on the screen. I have a timer every 0.01 change the attribute to the x and y of the character. Then the hammer is constrained to the two attributes so it is where the character is.
My problem is it is very juddery. Am i going about this the wrong way?
Cheers
My problem is it is very juddery. Am i going about this the wrong way?
Cheers
Comments
You can also constrain to different places around the character by changing the constrain self.position.X to characterX+40 for eg (this will contrain him 40 pixels to the right of you character).
Darren.
This is what I have:
Hammer:
Change Attribute self.Position.X to game.Player X +100
Change Attribute self.Position.X to game.Player Y +150
Character:
Interpolate attribute self.Position.X to 9728
Duration 50
Function Linear
Change Attribute game.PlayerX to self.Position.X
Change Attribute game.PlayerY to self.Position.Y
Control Camera
Cheers
Looks like you need to do this in the hammer instead of change attribute do..
Constrain Attribute self.Position.X to game.Player X +100
Constrain Attribute self.Position.Y to game.Player Y +150
Darren.
Darren.
Darren.
Cheers