-
making own collision
Hi
I having problems with the collison my active object is static,game view is from top
My move code is
Always---Player-set X/Y pos to Alterable value X/Y("Player")
set angle to ATan2(YMouse-Y("Player"),XMouse-X("Player"))*-1+0
Repeat while W is pressed---Player-Add Sin(Angle("Player")+90)*3 to Alterable Value X
Add Cos(Angle("Player")+90)*3 to Alterable Value Y
what can i do so my active dont get thru other objects??
-
You can make it so that when your object overlaps the object you don't want it to pass through, and the user is holding down the "W" key, it move the player backwards:
Conditions are in the default color.
Actions are in red.
"Player" is overlapping "Obstacle"
Repeat while "W" is pressed
Subtract Sin(Angle("Player")+90)*3 from Alterable Value X
Subtract Sin(Angle("Player")+90)*3 from Alterable Value Y
Hope this helps!
-
Yes Thanks
I made
"Player" is overlapping "Obstacle" without
Repeat while "W" is pressed
now it works
-