How do I Make a wall, my cursor cant pass

0 favourites
From the Asset Store
Cursor Magic
$2 USD
80% off
Mouse cursor is something that the player controls and sees all the time, that's why it is so important to make it cool!
  • How do i make a wall that my cursorsprite can not pass, Like this game: Http: // www . cursors . io

    I can make the cursor stop, but its inside the wall, so i have no way of getting it again..

  • test the collision before you reach the wall , maybe it's a stupid idea , but give it a try , make invisible object before the wall and test collision on it not the actual wall

  • test the collision before you reach the wall , maybe it's a stupid idea , but give it a try , make invisible object before the wall and test collision on it not the actual wall

    Ive tried, it works for moving the mouse slowly, but when your moving it fast, you clip through the wall, cause construct cant test it fast enough

  • If cursor hits wall stop

    if cursor is beyond wall move cursor back to the wall and stop

    if mouse movement direction is away from wall then release cursor to move

  • You cant move the actual cursor in construct from what i can tell, and how do i know what direction the cursor is coming from :/

  • Try to make object and attache cursor on him and them to cursor (if that possible), always. And that object have collision enabled... Not sure...

  • I think its a problem with how the cursor moves, is there any way to make a quick responsive cursor, that can not pass through solids? ive tried, custom movement, pathfinding, setting x/y to mouse.x/y, It just wont react to the solids, in a very responsive way...

  • Well, you could do this w/ my mouse lock plugin. Keep in mind: this only works in Firefox and Chrome; IE support is coming for IE12.

    The most recent version is 0.5. DL v0.3 too; it has a test capx and documentation:

  • ive tried, being the noobie i am, i did not understand most of it, this is what ive got right now.. but it still clips through the wall if your going fast enough with the cursor..

  • It doesn't look like you are binding the mouse, just turning it invisible. Is that the approach you prefer? It's actually quite clever, since it will work in any browser.

    Mouse-lock would work better, but won't work in IE until IE12. You could try to integrate a mouse lock approach, and defer to your original solution where mouse lock isn't supported (you can test that w/ my plugin).

  • I dont know how to use Mouse-lock, as i started with construct a few days ago, im not familiar with the plugins, though i have it installed, im not aware how and what it does..

    Developing for chrome, Not Ie, that was just the only solution i could think of after a couple of hours of thinking...

  • Anyone?

  • Well, if you download v0.3 of mouse lock, there is a capx included that might be of some help. Also some documentation.

    The best thing would be to simply post your capx; otherwise, we're kind of taking shots in the dark here.

  • Here, if you move fast enough the cursor clips right through.. it was made in Version R173, because my internet will probably break if i try to update it (i have working cursor lock v0.3)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can i bump?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)