#ImmediateHelpReq.

1 messages · Page 1 of 1 (latest)

novel river
#

Suggestion 1 i got from @molten widget :

*you will need to make your own code, but its simple.
you implement the interface. that makes you use a method called OnPointerDown. whenever you click on that object, it will activate that method, ONCE.
then, you can add a bool called cubeMove. whenever the OnPointerDown method get called, change cubeMove = true.

then repeat the process for IPointerUpHandler and OnPointerUp, and in there change cubeMove = false

now whenever the bool indicates whether or not you can move the cube. and then in the update method you can ask if(cubeMove) then addforce overtime to it .*

molten widget
#

there isnt really any other choice other than using IPointerHanlder interfaces. you can use them a bit differently but thats what there is. normal button method only has OnClick method, which acts when u press the button, not when u release it so you cant know for how long to move the cube.

novel river
#

ok i am trying it. Look at this : https://www.youtube.com/watch?v=_zyx8lCIb5A

#unityandroidtutorial #unitytutorial #unitynandroidmove
In this video I will show you how to move a character or an object or a player left and right with UI buttons if you are making a game for Android platform.

TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store
https://play.google.com/store/apps/details?id=com.ZoGames...

â–¶ Play video
#

lol idk

molten widget
#

this is a tutorial explaining how to do something simillar

novel river
molten widget
#

instead of doing a fill effect, do moving the cube instead

#

its the same thing

novel river
#

ok

molten widget
#

idk why lol

#

he adds this script he made on the buttons

#

but again same concept

novel river
#

@molten widget Thankyou so much, i made it finally! Just because of you!!!

#

I have to add sound and music and then its done. I can submit

#

tysm!!!

molten widget
#

np :)

novel river
#

hey @molten widget my game player(cube) is glitching towards left when I am clicking the left button, but not on right. Everything with the code is the same in right and left button but still. Please tell me how to fix it. Its an android game. Doing exactly that glitch on my mobile.

#

help!

novel river
molten widget
#

i dont know 😂

#

these kinds of bugs are specific to your game, idk how to fix it

#

check for inconsistencies

novel river
#

what are inconsistencies

#

my bad luck is at its peak today