moving problem
Reckless App
Member, PRO Posts: 47
holaaa... there is an
actor : MOTION > Linear Velocity X 250
rule > when touch or overlaps whit actor B change attribute "Linear Velocity X" change to "-Linear Velocity X"
it works good so when tha actor A toch actor B come back....
BUT
SOMETIMES the actor crash and touch the actor B and stay in the same position why??????
Comments
Have you added a display text behavior (or log) to the actor which shows the velocity X? Just for verification, to check if it changed to 0 or remains at 250.
change to 0
realy i see i like -1.9239248923 ... ad continusly change 2.942384283 number like these
When the actor hits the obstacle its linear velocity drops dramatically, you are then asking the actor to make this velocity negative.
so how i can make an actor touch another one and come back??
Make an integer attribute ('A') set it to 1 / set Linear Velocity X to 250.
Rule: When actor collides with obstacle
--Change A to 1-A
--Change Linear Velocity X to 250 *((A *2)-1)
@Reckless App See the file below. I am guessing thats what you want.
it works but
moving 250 ok and then when come back linear velocity is -750
You've probably made a mistake when creating the rule.
ma
maybe
thanks @GameAlchemist but i would like use just one wall 'cuz i'll use lots of level
Check this out. Hopefully this method will work. @Reckless App
the problem is if you put anothor wall in the center and jump over it when come back and touch it don't come back
hahaha
is a very simple thing but I can't understand how to fix it :
Ohhh I get it now, well I tried the method you mentioned in the first post by making it go left if lin vel x is greater than 20 and go right if lin vel x is less than 20. It works but sometimes(just as you mentioned) it doesn't work. And I am also stuck with a similar problem in my project too, instead with a linear velocity Y I want a box to know the force at which the actor is coming and sometimes it doesn't recognise the force.
The first change attribute condition is wrong.
yeahh... thank you very much....
In the end is the same thing sometimes the actor
walk through walls
I solved my problem, and this file might do that for you too. All I had to do was increase the drag in the physics panel. @Reckless App