how to make actor moving back and forth at a same place?
ragg
Member Posts: 65
hey guys...how to make the actors which is moving right and left itself,to only at a particular distance and place?i use timer to change its linear x motion to negative every few seconds...and it works...but when my main actor collide with those moving actors,it will bounce them away...causing the moving actors to move left and right at a different place....how to solve this?any help please..thanks
Comments
1.i have some moving actors which are constantly moving right and left...i use the method from wiki: http://gamesalad.com/wiki/how_tos:gsc_pacing
2.i have a main actor which i control and will collide with the moving actors horizontally
3.everytime my main actor collide with the moving actors..it will bounce the moving actors further away..at the end...the moving actors will be off screen...
i want my main actor to be able to collide with the moving actors...but i dont want it to bounce them off...
go in the actor editor and to your left, under Physics there is restitution.
it should work
If you want an event (such as when the 2 actors touch...do something), then use a rule per Sparky's suggestion.
i make some new actors to constrain its position to the moving actors and make them collidable with main actor...then take off collide behaviour from the moving actors...now the new actors wont bounce off whenever it collide with main actor...i know it's a stupid idea as it will slow down my fps...if u guys hav any idea..please share with me...thanks!
btw...when should i turn on run to completion in the timer?i notice the timer not so accurate as the moving actors move away to off screen as it moving back forth..