moving obstacles
kirkland
Removed Posts: 268
hi
what i am wanting to acheive is an obstacle going up and down in the air but if an actor hits it let it bounce off and the obstacle keep on moving up and down
has anyone got any ideas
what i am wanting to acheive is an obstacle going up and down in the air but if an actor hits it let it bounce off and the obstacle keep on moving up and down
has anyone got any ideas
Comments
Add a rule to interpolate its Y position to the lower and upper points you want in a loop. Ie; put when self.positionY=250 then interpolate self.positionY to 100. Then if self.positionY=100 then interpolate self.positionY to 250 and set the interval to control how fast.
The other actor can be set to collide with this obstacle. Control how much bounce by using a restition value between 0 (no bounce and 1 which is high bounce.
what i am wanting to acheive is an obstacle going up and down in the air but if an actor hits it let it bounce off and the obstacle keep on moving up and down
has anyone got any ideas but a detailed answer
• two interpolates on the up/down obstacle.
• When it reaches the top, interpolate the Y position to move downwards
• When it reaches the bottom, interpolate the Y position to move upwards.
• Rules can be used to trigger the two interpolates
• Actor is set to not movable
• Set the restitution to 2, that will make it bouncy
• A collide behavior, will make the main actor bounce off.
http://gamesalad.com/forums/topic.php?id=16686
Welcome to GameSalad
Working with Attributes
Actor Attributes
Score Keeping part 1
Score Keeping part 2
Score Keeping part 3
Score Keeping part 4
Creating a Health Bar
After that watch the rest of the cookbook youtube videos here:
http://www.youtube.com/user/GameSaladCookbook
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
edit:... and merged
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